1# $FreeBSD$ 2 3.include <bsd.init.mk> 4 5SHLIB_NAME= libclang_rt.asan-${CRTARCH}.so 6.undef NO_PIC # sorry... 7 8.PATH: ${CRTSRC}/lib/asan\ 9 ${CRTSRC}/lib/interception\ 10 ${CRTSRC}/lib/sanitizer_common\ 11 ${CRTSRC}/lib/lsan\ 12 ${CRTSRC}/lib/ubsan 13 14SRCS= interception_linux.cc\ 15 interception_mac.cc\ 16 interception_win.cc\ 17 interception_type_test.cc\ 18 sanitizer_allocator.cc\ 19 sanitizer_common.cc\ 20 sanitizer_deadlock_detector1.cc\ 21 sanitizer_deadlock_detector2.cc\ 22 sanitizer_flags.cc\ 23 sanitizer_flag_parser.cc\ 24 sanitizer_libc.cc\ 25 sanitizer_libignore.cc\ 26 sanitizer_linux.cc\ 27 sanitizer_mac.cc\ 28 sanitizer_persistent_allocator.cc\ 29 sanitizer_platform_limits_linux.cc\ 30 sanitizer_platform_limits_posix.cc\ 31 sanitizer_posix.cc\ 32 sanitizer_printf.cc\ 33 sanitizer_procmaps_common.cc\ 34 sanitizer_procmaps_freebsd.cc\ 35 sanitizer_procmaps_linux.cc\ 36 sanitizer_procmaps_mac.cc\ 37 sanitizer_stackdepot.cc\ 38 sanitizer_stacktrace.cc\ 39 sanitizer_stacktrace_printer.cc\ 40 sanitizer_suppressions.cc\ 41 sanitizer_symbolizer.cc\ 42 sanitizer_symbolizer_libbacktrace.cc\ 43 sanitizer_symbolizer_mac.cc\ 44 sanitizer_symbolizer_win.cc\ 45 sanitizer_tls_get_addr.cc\ 46 sanitizer_thread_registry.cc\ 47 sanitizer_win.cc\ 48 sanitizer_common_libcdep.cc\ 49 sanitizer_coverage_libcdep.cc\ 50 sanitizer_coverage_mapping_libcdep.cc\ 51 sanitizer_linux_libcdep.cc\ 52 sanitizer_posix_libcdep.cc\ 53 sanitizer_stacktrace_libcdep.cc\ 54 sanitizer_stoptheworld_linux_libcdep.cc\ 55 sanitizer_symbolizer_libcdep.cc\ 56 sanitizer_symbolizer_posix_libcdep.cc\ 57 sanitizer_unwind_linux_libcdep.cc\ 58 lsan_common.cc\ 59 lsan_common_linux.cc\ 60 ubsan_diag.cc\ 61 ubsan_init.cc\ 62 ubsan_flags.cc\ 63 ubsan_handlers.cc\ 64 ubsan_value.cc\ 65 asan_allocator.cc\ 66 asan_activation.cc\ 67 asan_debugging.cc\ 68 asan_fake_stack.cc\ 69 asan_flags.cc\ 70 asan_globals.cc\ 71 asan_interceptors.cc\ 72 asan_linux.cc\ 73 asan_mac.cc\ 74 asan_malloc_linux.cc\ 75 asan_malloc_mac.cc\ 76 asan_malloc_win.cc\ 77 asan_poisoning.cc\ 78 asan_posix.cc\ 79 asan_report.cc\ 80 asan_rtl.cc\ 81 asan_stack.cc\ 82 asan_stats.cc\ 83 asan_suppressions.cc\ 84 asan_thread.cc\ 85 asan_win.cc\ 86 asan_new_delete.cc\ 87 ubsan_handlers_cxx.cc\ 88 ubsan_type_hash.cc\ 89 ubsan_type_hash_itanium.cc\ 90 ubsan_type_hash_win.cc 91 92# Kludge around a bsd.lib.mk shortcoming: when SHLIB_NAME is defined, but LIB 93# and LIB_CXX are undefined (which forces building only a shared library), 94# there is no way to tell it to use ${CXX} for linking. Since the files for 95# this library are all C++ anyway, simply set CC to CXX. 96CC= ${CXX} 97 98.include <bsd.lib.mk> 99 100CXXFLAGS.ubsan_handlers_cxx.cc= -frtti 101CXXFLAGS.ubsan_type_hash.cc= -frtti 102CXXFLAGS.ubsan_type_hash_itanium.cc= -frtti 103CXXFLAGS.ubsan_type_hash_win.cc= -frtti 104