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_allocator_report.cc 40SRCS+= sanitizer_common/sanitizer_common.cc 41SRCS+= sanitizer_common/sanitizer_common_libcdep.cc 42SRCS+= sanitizer_common/sanitizer_coverage_libcdep_new.cc 43SRCS+= sanitizer_common/sanitizer_deadlock_detector1.cc 44SRCS+= sanitizer_common/sanitizer_deadlock_detector2.cc 45SRCS+= sanitizer_common/sanitizer_errno.cc 46SRCS+= sanitizer_common/sanitizer_file.cc 47SRCS+= sanitizer_common/sanitizer_flag_parser.cc 48SRCS+= sanitizer_common/sanitizer_flags.cc 49SRCS+= sanitizer_common/sanitizer_libc.cc 50SRCS+= sanitizer_common/sanitizer_libignore.cc 51SRCS+= sanitizer_common/sanitizer_linux.cc 52SRCS+= sanitizer_common/sanitizer_linux_libcdep.cc 53SRCS+= sanitizer_common/sanitizer_persistent_allocator.cc 54SRCS+= sanitizer_common/sanitizer_platform_limits_freebsd.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_bsd.cc 61SRCS+= sanitizer_common/sanitizer_procmaps_common.cc 62SRCS+= sanitizer_common/sanitizer_stackdepot.cc 63SRCS+= sanitizer_common/sanitizer_stacktrace.cc 64SRCS+= sanitizer_common/sanitizer_stacktrace_libcdep.cc 65SRCS+= sanitizer_common/sanitizer_stacktrace_printer.cc 66SRCS+= sanitizer_common/sanitizer_suppressions.cc 67SRCS+= sanitizer_common/sanitizer_symbolizer.cc 68SRCS+= sanitizer_common/sanitizer_symbolizer_libbacktrace.cc 69SRCS+= sanitizer_common/sanitizer_symbolizer_libcdep.cc 70SRCS+= sanitizer_common/sanitizer_symbolizer_posix_libcdep.cc 71SRCS+= sanitizer_common/sanitizer_symbolizer_report.cc 72SRCS+= sanitizer_common/sanitizer_termination.cc 73SRCS+= sanitizer_common/sanitizer_thread_registry.cc 74SRCS+= sanitizer_common/sanitizer_tls_get_addr.cc 75SRCS+= sanitizer_common/sanitizer_type_traits.cc 76SRCS+= sanitizer_common/sanitizer_unwind_linux_libcdep.cc 77SRCS+= ubsan/ubsan_diag.cc 78SRCS+= ubsan/ubsan_flags.cc 79SRCS+= ubsan/ubsan_handlers.cc 80SRCS+= ubsan/ubsan_handlers_cxx.cc 81SRCS+= ubsan/ubsan_init.cc 82SRCS+= ubsan/ubsan_monitor.cc 83SRCS+= ubsan/ubsan_type_hash.cc 84SRCS+= ubsan/ubsan_type_hash_itanium.cc 85SRCS+= ubsan/ubsan_value.cc 86 87# Kludge around a bsd.lib.mk shortcoming: when SHLIB_NAME is defined, but LIB 88# and LIB_CXX are undefined (which forces building only a shared library), 89# there is no way to tell it to use ${CXX} for linking. Since the files for 90# this library are all C++ anyway, simply set CC to CXX. 91CC= ${CXX} 92 93.include <bsd.lib.mk> 94 95CXXFLAGS.ubsan_handlers_cxx.cc= -frtti 96CXXFLAGS.ubsan_type_hash.cc= -frtti 97CXXFLAGS.ubsan_type_hash_itanium.cc= -frtti 98