Debian Codegraph @

libsanitizer/asan/Makefile.am

raw
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 -DASAN_HAS_EXCEPTIONS=1 -DASAN_NEEDS_SEGV=1 -DCAN_SANITIZE_UB=0 -DASAN_HAS_CXA_RETHROW_PRIMARY_EXCEPTION=0 @AS_SYM_ASSIGN_DEFS@
7 if USING_MAC_INTERPOSE
8 DEFS += -DMAC_INTERPOSE_FUNCTIONS -DMISSING_BLOCKS_SUPPORT
9 endif
10 AM_CXXFLAGS = -Wall -W -Wno-unused-parameter -Wwrite-strings -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++17
13 AM_CXXFLAGS += $(EXTRA_CXXFLAGS)
14 AM_CCASFLAGS = $(EXTRA_ASFLAGS)
15 ACLOCAL_AMFLAGS = -I $(top_srcdir) -I $(top_srcdir)/config
16
17 toolexeclib_LTLIBRARIES = libasan.la
18 nodist_toolexeclib_HEADERS = libasan_preinit.o
19
20 asan_files = \
21 asan_activation.cpp \
22 asan_allocator.cpp \
23 asan_debugging.cpp \
24 asan_descriptions.cpp \
25 asan_errors.cpp \
26 asan_fake_stack.cpp \
27 asan_flags.cpp \
28 asan_globals.cpp \
29 asan_interceptors.cpp \
30 asan_interceptors_memintrinsics.cpp \
31 asan_linux.cpp \
32 asan_mac.cpp \
33 asan_malloc_linux.cpp \
34 asan_malloc_mac.cpp \
35 asan_malloc_win.cpp \
36 asan_memory_profile.cpp \
37 asan_new_delete.cpp \
38 asan_poisoning.cpp \
39 asan_posix.cpp \
40 asan_premap_shadow.cpp \
41 asan_report.cpp \
42 asan_rtl.cpp \
43 asan_shadow_setup.cpp \
44 asan_stack.cpp \
45 asan_stats.cpp \
46 asan_suppressions.cpp \
47 asan_thread.cpp \
48 asan_win.cpp \
49 asan_win_dynamic_runtime_thunk.cpp \
50 asan_interceptors_vfork.S
51
52 libasan_la_SOURCES = $(asan_files)
53 libasan_la_LIBADD = $(top_builddir)/sanitizer_common/libsanitizer_common.la $(top_builddir)/lsan/libsanitizer_lsan.la
54 if !USING_MAC_INTERPOSE
55 libasan_la_LIBADD += $(top_builddir)/interception/libinterception.la
56 endif
57 if LIBBACKTRACE_SUPPORTED
58 libasan_la_LIBADD += $(top_builddir)/libbacktrace/libsanitizer_libbacktrace.la
59 endif
60 libasan_la_LIBADD += $(LIBSTDCXX_RAW_CXX_LDFLAGS)
61
62 if ENABLE_DARWIN_AT_RPATH
63 libasan_darwin_rpath = -Wc,-nodefaultrpaths
64 libasan_darwin_rpath += -Wl,-rpath,@loader_path
65 endif
66 libasan_la_LDFLAGS = -version-info `grep -v '^\#' $(srcdir)/libtool-version` \
67 $(link_libasan) $(libasan_darwin_rpath)
68
69 libasan_preinit.o: asan_preinit.o
70 cp $< $@
71
72 # Work around what appears to be a GNU make bug handling MAKEFLAGS
73 # values defined in terms of make variables, as is the case for CC and
74 # friends when we are called from the top level Makefile.
75 AM_MAKEFLAGS = \
76 "AR_FLAGS=$(AR_FLAGS)" \
77 "CC_FOR_BUILD=$(CC_FOR_BUILD)" \
78 "CFLAGS=$(CFLAGS)" \
79 "CXXFLAGS=$(CXXFLAGS)" \
80 "CFLAGS_FOR_BUILD=$(CFLAGS_FOR_BUILD)" \
81 "CFLAGS_FOR_TARGET=$(CFLAGS_FOR_TARGET)" \
82 "INSTALL=$(INSTALL)" \
83 "INSTALL_DATA=$(INSTALL_DATA)" \
84 "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
85 "INSTALL_SCRIPT=$(INSTALL_SCRIPT)" \
86 "JC1FLAGS=$(JC1FLAGS)" \
87 "LDFLAGS=$(LDFLAGS)" \
88 "LIBCFLAGS=$(LIBCFLAGS)" \
89 "LIBCFLAGS_FOR_TARGET=$(LIBCFLAGS_FOR_TARGET)" \
90 "MAKE=$(MAKE)" \
91 "MAKEINFO=$(MAKEINFO) $(MAKEINFOFLAGS)" \
92 "PICFLAG=$(PICFLAG)" \
93 "PICFLAG_FOR_TARGET=$(PICFLAG_FOR_TARGET)" \
94 "SHELL=$(SHELL)" \
95 "RUNTESTFLAGS=$(RUNTESTFLAGS)" \
96 "exec_prefix=$(exec_prefix)" \
97 "infodir=$(infodir)" \
98 "libdir=$(libdir)" \
99 "prefix=$(prefix)" \
100 "includedir=$(includedir)" \
101 "AR=$(AR)" \
102 "AS=$(AS)" \
103 "LD=$(LD)" \
104 "LIBCFLAGS=$(LIBCFLAGS)" \
105 "NM=$(NM)" \
106 "PICFLAG=$(PICFLAG)" \
107 "RANLIB=$(RANLIB)" \
108 "DESTDIR=$(DESTDIR)"
109
110 MAKEOVERRIDES=
111
112 ## ################################################################
113