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