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