1 AM_CPPFLAGS = -I $(top_srcdir)/include -I $(top_srcdir)
3 # May be used by toolexeclibdir.
4 gcc_version := $(shell @get_gcc_base_ver@ $(top_srcdir)/../gcc/BASE-VER)
6 DEFS = -D_GNU_SOURCE -D_DEBUG -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -DASAN_HAS_EXCEPTIONS=1 -DASAN_NEEDS_SEGV=1 -DCAN_SANITIZE_UB=0 -DASAN_HAS_CXA_RETHROW_PRIMARY_EXCEPTION=0 @AS_SYM_ASSIGN_DEFS@
8 DEFS += -DMAC_INTERPOSE_FUNCTIONS -DMISSING_BLOCKS_SUPPORT
10 AM_CXXFLAGS = -Wall -W -Wno-unused-parameter -Wwrite-strings -pedantic -Wno-long-long -fPIC -fno-builtin -fno-exceptions -fno-rtti -fomit-frame-pointer -funwind-tables -fvisibility=hidden -Wno-variadic-macros -fno-ipa-icf
11 AM_CXXFLAGS += $(LIBSTDCXX_RAW_CXX_CXXFLAGS)
12 AM_CXXFLAGS += -std=gnu++14
13 AM_CXXFLAGS += $(EXTRA_CXXFLAGS)
14 AM_CCASFLAGS = $(EXTRA_ASFLAGS)
15 ACLOCAL_AMFLAGS = -I $(top_srcdir) -I $(top_srcdir)/config
17 toolexeclib_LTLIBRARIES = libasan.la
18 nodist_toolexeclib_HEADERS = libasan_preinit.o
24 asan_descriptions.cpp \
29 asan_interceptors.cpp \
30 asan_interceptors_memintrinsics.cpp \
33 asan_malloc_linux.cpp \
36 asan_memory_profile.cpp \
40 asan_premap_shadow.cpp \
43 asan_shadow_setup.cpp \
46 asan_suppressions.cpp \
49 asan_win_dll_thunk.cpp \
50 asan_win_dynamic_runtime_thunk.cpp \
51 asan_interceptors_vfork.S
53 libasan_la_SOURCES = $(asan_files)
54 libasan_la_LIBADD = $(top_builddir)/sanitizer_common/libsanitizer_common.la $(top_builddir)/lsan/libsanitizer_lsan.la
55 if !USING_MAC_INTERPOSE
56 libasan_la_LIBADD += $(top_builddir)/interception/libinterception.la
58 if LIBBACKTRACE_SUPPORTED
59 libasan_la_LIBADD += $(top_builddir)/libbacktrace/libsanitizer_libbacktrace.la
61 libasan_la_LIBADD += $(LIBSTDCXX_RAW_CXX_LDFLAGS)
63 if ENABLE_DARWIN_AT_RPATH
64 libasan_darwin_rpath = -Wc,-nodefaultrpaths
65 libasan_darwin_rpath += -Wl,-rpath,@loader_path
67 libasan_la_LDFLAGS = -version-info `grep -v '^\#' $(srcdir)/libtool-version` \
68 $(link_libasan) $(libasan_darwin_rpath)
70 libasan_preinit.o: asan_preinit.o
73 # Work around what appears to be a GNU make bug handling MAKEFLAGS
74 # values defined in terms of make variables, as is the case for CC and
75 # friends when we are called from the top level Makefile.
77 "AR_FLAGS=$(AR_FLAGS)" \
78 "CC_FOR_BUILD=$(CC_FOR_BUILD)" \
80 "CXXFLAGS=$(CXXFLAGS)" \
81 "CFLAGS_FOR_BUILD=$(CFLAGS_FOR_BUILD)" \
82 "CFLAGS_FOR_TARGET=$(CFLAGS_FOR_TARGET)" \
83 "INSTALL=$(INSTALL)" \
84 "INSTALL_DATA=$(INSTALL_DATA)" \
85 "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
86 "INSTALL_SCRIPT=$(INSTALL_SCRIPT)" \
87 "JC1FLAGS=$(JC1FLAGS)" \
88 "LDFLAGS=$(LDFLAGS)" \
89 "LIBCFLAGS=$(LIBCFLAGS)" \
90 "LIBCFLAGS_FOR_TARGET=$(LIBCFLAGS_FOR_TARGET)" \
92 "MAKEINFO=$(MAKEINFO) $(MAKEINFOFLAGS)" \
93 "PICFLAG=$(PICFLAG)" \
94 "PICFLAG_FOR_TARGET=$(PICFLAG_FOR_TARGET)" \
96 "RUNTESTFLAGS=$(RUNTESTFLAGS)" \
97 "exec_prefix=$(exec_prefix)" \
98 "infodir=$(infodir)" \
101 "includedir=$(includedir)" \
105 "LIBCFLAGS=$(LIBCFLAGS)" \
107 "PICFLAG=$(PICFLAG)" \
113 ## ################################################################