Home | History | Annotate | Line # | Download | only in libasan
Makefile revision 1.14
      1   1.1  christos 
      2   1.1  christos .include <bsd.own.mk>
      3   1.1  christos 
      4   1.1  christos .include "../Makefile.inc"
      5   1.1  christos 
      6   1.1  christos ASAN=${GCCDIST}/libsanitizer
      7   1.1  christos .PATH: ${ASAN}/asan ${ASAN}/interception ${ASAN}/sanitizer_common
      8   1.1  christos 
      9   1.1  christos ASAN_SRCS= \
     10  1.12  christos asan_activation.cc \
     11  1.12  christos asan_allocator2.cc \
     12  1.12  christos asan_debugging.cc \
     13  1.12  christos asan_fake_stack.cc \
     14  1.12  christos asan_globals.cc \
     15  1.12  christos asan_interceptors.cc \
     16  1.12  christos asan_linux.cc \
     17  1.12  christos asan_mac.cc \
     18  1.12  christos asan_malloc_linux.cc \
     19  1.12  christos asan_malloc_mac.cc \
     20  1.12  christos asan_malloc_win.cc \
     21  1.12  christos asan_new_delete.cc \
     22  1.12  christos asan_poisoning.cc \
     23  1.12  christos asan_posix.cc \
     24  1.12  christos asan_report.cc \
     25  1.12  christos asan_rtl.cc \
     26  1.12  christos asan_stack.cc \
     27  1.12  christos asan_stats.cc \
     28  1.12  christos asan_thread.cc \
     29  1.12  christos asan_win.cc \
     30  1.12  christos asan_win_dll_thunk.cc \
     31  1.12  christos asan_win_dynamic_runtime_thunk.cc
     32   1.1  christos 
     33   1.2  christos INTERCEPTION_SRCS= \
     34  1.12  christos interception_linux.cc \
     35  1.12  christos interception_mac.cc \
     36  1.12  christos interception_type_test.cc \
     37  1.12  christos interception_win.cc
     38   1.1  christos 
     39   1.1  christos SANITIZER_SRCS= \
     40  1.12  christos sanitizer_allocator.cc \
     41  1.12  christos sanitizer_common.cc \
     42  1.12  christos sanitizer_common_libcdep.cc \
     43  1.12  christos sanitizer_coverage_libcdep.cc \
     44  1.12  christos sanitizer_coverage_mapping_libcdep.cc \
     45  1.12  christos sanitizer_deadlock_detector1.cc \
     46  1.12  christos sanitizer_deadlock_detector2.cc \
     47  1.12  christos sanitizer_flags.cc \
     48  1.12  christos sanitizer_libc.cc \
     49  1.12  christos sanitizer_libignore.cc \
     50  1.12  christos sanitizer_linux.cc \
     51  1.12  christos sanitizer_linux_libcdep.cc \
     52  1.12  christos sanitizer_mac.cc \
     53  1.12  christos sanitizer_persistent_allocator.cc \
     54  1.12  christos sanitizer_platform_limits_linux.cc \
     55  1.12  christos sanitizer_platform_limits_posix.cc \
     56  1.12  christos sanitizer_posix.cc \
     57  1.12  christos sanitizer_posix_libcdep.cc \
     58  1.12  christos sanitizer_printf.cc \
     59  1.12  christos sanitizer_procmaps_common.cc \
     60  1.13  christos sanitizer_procmaps_netbsd.cc \
     61  1.12  christos sanitizer_procmaps_freebsd.cc \
     62  1.12  christos sanitizer_procmaps_linux.cc \
     63  1.12  christos sanitizer_procmaps_mac.cc \
     64  1.12  christos sanitizer_stackdepot.cc \
     65  1.12  christos sanitizer_stacktrace.cc \
     66  1.12  christos sanitizer_stacktrace_libcdep.cc \
     67  1.12  christos sanitizer_stacktrace_printer.cc \
     68  1.12  christos sanitizer_stoptheworld_linux_libcdep.cc \
     69  1.12  christos sanitizer_suppressions.cc \
     70  1.12  christos sanitizer_symbolizer.cc \
     71  1.12  christos sanitizer_symbolizer_libbacktrace.cc \
     72  1.12  christos sanitizer_symbolizer_libcdep.cc \
     73  1.12  christos sanitizer_symbolizer_posix_libcdep.cc \
     74  1.12  christos sanitizer_symbolizer_win.cc \
     75  1.12  christos sanitizer_thread_registry.cc \
     76  1.12  christos sanitizer_tls_get_addr.cc \
     77  1.12  christos sanitizer_unwind_posix_libcdep.cc \
     78  1.12  christos sanitizer_win.cc
     79   1.1  christos 
     80   1.3  christos # The linux build does this to avoid preinit sections on shared libraries
     81   1.3  christos CSHLIBFLAGS+= -DPIC
     82   1.3  christos 
     83   1.1  christos LIB=	asan
     84   1.1  christos SRCS=	${ASAN_SRCS} ${INTERCEPTION_SRCS} ${SANITIZER_SRCS}
     85   1.5  christos CPPFLAGS+=-I${ASAN}/include -I${ASAN}
     86   1.7  christos CPPFLAGS.sanitizer_netbsd.cc+=-I${GCCDIST}/gcc/ginclude
     87  1.12  christos CPPFLAGS+=-D_DEBUG -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -DASAN_HAS_EXCEPTIONS=1 -DASAN_FLEXIBLE_MAPPING_AND_OFFSET=0 -DASAN_NEEDS_SEGV=1
     88   1.1  christos 
     89   1.6  christos LIBDPLIBS+=    stdc++ ${.CURDIR}/../libstdc++-v3
     90   1.6  christos LIBDPLIBS+=    pthread ${.CURDIR}/../../../../../lib/libpthread
     91  1.12  christos COPTS+=-std=gnu++11 -fsized-deallocation -fvisibility=hidden
     92  1.14  christos COPTS+=-fno-builtin -fno-exceptions -fno-rtti-funwind-tables
     93  1.14  christos # Can't profile without it`
     94  1.14  christos #-fomit-frame-pointer
     95   1.3  christos 
     96  1.10    martin .if ${MACHINE_ARCH} == "vax"
     97  1.10    martin COPTS.asan_allocator2.cc += -O1
     98  1.10    martin COPTS.sanitizer_mac.cc += -O1
     99  1.10    martin COPTS.sanitizer_netbsd.cc += -O1
    100  1.10    martin COPTS.sanitizer_printf.cc += -O1
    101  1.10    martin COPTS.sanitizer_stackdepot.cc += -O1
    102  1.10    martin .endif
    103  1.10    martin 
    104   1.1  christos .include <bsd.lib.mk>
    105