Home | History | Annotate | Line # | Download | only in libasan
Makefile revision 1.33
      1 # $NetBSD: Makefile,v 1.33 2020/09/14 15:01:57 kamil Exp $
      2 
      3 UNSUPPORTED_COMPILER.clang=	# defined
      4 NOSANITIZER=	# defined
      5 
      6 .include <bsd.own.mk>
      7 
      8 .include "../Makefile.inc"
      9 .include "../Makefile.sanitizer"
     10 
     11 .PATH: ${SANITIZER}/asan ${SANITIZER}/lsan
     12 
     13 # XXXmknative
     14 ASAN_SRCS= \
     15 	asan_activation.cc \
     16 	asan_allocator.cc \
     17 	asan_debugging.cc \
     18 	asan_descriptions.cc \
     19 	asan_errors.cc \
     20 	asan_fake_stack.cc \
     21 	asan_flags.cc \
     22 	asan_globals.cc \
     23 	asan_interceptors.cc \
     24 	asan_interceptors_memintrinsics.cc \
     25 	asan_linux.cc \
     26 	asan_mac.cc \
     27 	asan_malloc_linux.cc \
     28 	asan_malloc_mac.cc \
     29 	asan_malloc_win.cc \
     30 	asan_memory_profile.cc \
     31 	asan_new_delete.cc \
     32 	asan_poisoning.cc \
     33 	asan_posix.cc \
     34 	asan_report.cc \
     35 	asan_rtl.cc \
     36 	asan_shadow_setup.cc \
     37 	asan_stack.cc \
     38 	asan_stats.cc \
     39 	asan_suppressions.cc \
     40 	asan_thread.cc \
     41 	asan_win.cc \
     42 	asan_win_dll_thunk.cc \
     43 	asan_win_dynamic_runtime_thunk.cc
     44 
     45 LIB=	asan
     46 SRCS+=	${ASAN_SRCS} lsan_common.cc lsan_common_linux.cc
     47 LIBDPLIBS+= rt ${NETBSDSRCDIR}/lib/librt
     48 LIBDPLIBS+= m  ${NETBSDSRCDIR}/lib/libm
     49 LIBDPLIBS+= pthread ${NETBSDSRCDIR}/lib/libpthread
     50 CPPFLAGS+=-DCAN_SANITIZE_UB=0
     51 
     52 .if ${MACHINE_ARCH} == "vax"
     53 COPTS.asan_allocator.cc += -O1
     54 COPTS.asan_report.cc += -O1
     55 COPTS.sanitizer_file.cc += -O1
     56 COPTS.ubsan_diag.cc += -O1
     57 COPTS.ubsan_init.cc += -O1
     58 .endif
     59 
     60 .if ${MACHINE_ARCH} == "mipsel" || ${MACHINE_ARCH} == "mipseb"
     61 COPTS.asan_interceptors.cc += -O1
     62 .endif
     63 
     64 .include <bsd.lib.mk>
     65