Home | History | Annotate | Line # | Download | only in hwasan
      1 AM_CPPFLAGS = -I $(top_srcdir)/include -I $(top_srcdir)
      2 
      3 # May be used by toolexeclibdir.
      4 gcc_version := $(shell @get_gcc_base_ver@ $(top_srcdir)/../gcc/BASE-VER)
      5 
      6 DEFS = -D_GNU_SOURCE -D_DEBUG -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -DCAN_SANITIZE_UB=0 -DHWASAN_WITH_INTERCEPTORS=1
      7 AM_CXXFLAGS = -Wall -W -Wno-unused-parameter -Wwrite-strings -pedantic -Wno-long-long  -fPIC -fno-builtin -fno-exceptions -fno-rtti -funwind-tables -fvisibility=hidden -Wno-variadic-macros -fno-ipa-icf
      8 AM_CXXFLAGS += $(LIBSTDCXX_RAW_CXX_CXXFLAGS)
      9 AM_CXXFLAGS += -std=gnu++14
     10 AM_CXXFLAGS += $(EXTRA_CXXFLAGS)
     11 AM_CCASFLAGS = $(EXTRA_ASFLAGS)
     12 ACLOCAL_AMFLAGS = -I $(top_srcdir) -I $(top_srcdir)/config
     13 
     14 toolexeclib_LTLIBRARIES = libhwasan.la
     15 nodist_toolexeclib_HEADERS = libhwasan_preinit.o
     16 
     17 hwasan_files = \
     18 	hwasan_allocation_functions.cpp \
     19 	hwasan_allocator.cpp \
     20 	hwasan.cpp \
     21 	hwasan_dynamic_shadow.cpp \
     22 	hwasan_exceptions.cpp \
     23 	hwasan_flags.inc \
     24 	hwasan_fuchsia.cpp \
     25 	hwasan_globals.cpp \
     26 	hwasan_interceptors.cpp \
     27 	hwasan_interceptors_vfork.S \
     28 	hwasan_linux.cpp \
     29 	hwasan_memintrinsics.cpp \
     30 	hwasan_new_delete.cpp \
     31 	hwasan_poisoning.cpp \
     32 	hwasan_report.cpp \
     33 	hwasan_setjmp_aarch64.S \
     34 	hwasan_setjmp_x86_64.S \
     35 	hwasan_tag_mismatch_aarch64.S \
     36 	hwasan_thread.cpp \
     37 	hwasan_thread_list.cpp \
     38 	hwasan_type_test.cpp
     39 
     40 libhwasan_la_SOURCES = $(hwasan_files)
     41 libhwasan_la_LIBADD = $(top_builddir)/sanitizer_common/libsanitizer_common.la $(top_builddir)/lsan/libsanitizer_lsan.la
     42 if !USING_MAC_INTERPOSE
     43 libhwasan_la_LIBADD += $(top_builddir)/interception/libinterception.la
     44 endif
     45 if LIBBACKTRACE_SUPPORTED
     46 libhwasan_la_LIBADD += $(top_builddir)/libbacktrace/libsanitizer_libbacktrace.la
     47 endif
     48 libhwasan_la_LIBADD += $(LIBSTDCXX_RAW_CXX_LDFLAGS)
     49 
     50 if ENABLE_DARWIN_AT_RPATH
     51 libhwasan_darwin_rpath = -nodefaultrpaths -Wl,-rpath,@loader_path/
     52 endif
     53 libhwasan_la_LDFLAGS = -version-info `grep -v '^\#' $(srcdir)/libtool-version` \
     54 	$(link_libhwasan) $(libhwasan_darwin_rpath)
     55 
     56 libhwasan_preinit.o: hwasan_preinit.o
     57 	cp $< $@
     58 
     59 # Work around what appears to be a GNU make bug handling MAKEFLAGS
     60 # values defined in terms of make variables, as is the case for CC and
     61 # friends when we are called from the top level Makefile.
     62 AM_MAKEFLAGS = \
     63 	"AR_FLAGS=$(AR_FLAGS)" \
     64 	"CC_FOR_BUILD=$(CC_FOR_BUILD)" \
     65 	"CFLAGS=$(CFLAGS)" \
     66 	"CXXFLAGS=$(CXXFLAGS)" \
     67 	"CFLAGS_FOR_BUILD=$(CFLAGS_FOR_BUILD)" \
     68 	"CFLAGS_FOR_TARGET=$(CFLAGS_FOR_TARGET)" \
     69 	"INSTALL=$(INSTALL)" \
     70 	"INSTALL_DATA=$(INSTALL_DATA)" \
     71 	"INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
     72 	"INSTALL_SCRIPT=$(INSTALL_SCRIPT)" \
     73 	"JC1FLAGS=$(JC1FLAGS)" \
     74 	"LDFLAGS=$(LDFLAGS)" \
     75 	"LIBCFLAGS=$(LIBCFLAGS)" \
     76 	"LIBCFLAGS_FOR_TARGET=$(LIBCFLAGS_FOR_TARGET)" \
     77 	"MAKE=$(MAKE)" \
     78 	"MAKEINFO=$(MAKEINFO) $(MAKEINFOFLAGS)" \
     79 	"PICFLAG=$(PICFLAG)" \
     80 	"PICFLAG_FOR_TARGET=$(PICFLAG_FOR_TARGET)" \
     81 	"SHELL=$(SHELL)" \
     82 	"RUNTESTFLAGS=$(RUNTESTFLAGS)" \
     83 	"exec_prefix=$(exec_prefix)" \
     84 	"infodir=$(infodir)" \
     85 	"libdir=$(libdir)" \
     86 	"prefix=$(prefix)" \
     87 	"includedir=$(includedir)" \
     88 	"AR=$(AR)" \
     89 	"AS=$(AS)" \
     90 	"LD=$(LD)" \
     91 	"LIBCFLAGS=$(LIBCFLAGS)" \
     92 	"NM=$(NM)" \
     93 	"PICFLAG=$(PICFLAG)" \
     94 	"RANLIB=$(RANLIB)" \
     95 	"DESTDIR=$(DESTDIR)"
     96 
     97 MAKEOVERRIDES=
     98 
     99 ## ################################################################
    100 
    101 
    102