summaryrefslogtreecommitdiff
path: root/make
diff options
context:
space:
mode:
authorAlexey Samsonov <samsonov@google.com>2014-05-12 18:39:22 +0000
committerAlexey Samsonov <samsonov@google.com>2014-05-12 18:39:22 +0000
commit7dd26ecdc8f191ad02120ea5d05e41bea3dd80a5 (patch)
tree6bb916f962bdd558983e0c7775c2b47c77b90595 /make
parent238b9fd4b7be732c87629d8fe7c583bbe7c002e9 (diff)
[ASan] Split static ASan runtime in two parts: asan and asan_cxx.
asan_cxx containts replacements for new/delete operators, and should only be linked in C++ mode. We plan to start building this part with exception support to make new more standard-compliant. See https://code.google.com/p/address-sanitizer/issues/detail?id=295 for more details. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@208609 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'make')
-rw-r--r--make/platform/clang_darwin.mk6
-rw-r--r--make/platform/clang_linux.mk19
2 files changed, 18 insertions, 7 deletions
diff --git a/make/platform/clang_darwin.mk b/make/platform/clang_darwin.mk
index 32803afc4..e9021fc51 100644
--- a/make/platform/clang_darwin.mk
+++ b/make/platform/clang_darwin.mk
@@ -227,11 +227,13 @@ FUNCTIONS.profile_osx := GCDAProfiling InstrProfiling InstrProfilingBuffer \
InstrProfilingRuntime
FUNCTIONS.profile_ios := $(FUNCTIONS.profile_osx)
-FUNCTIONS.asan_osx_dynamic := $(AsanFunctions) $(InterceptionFunctions) \
+FUNCTIONS.asan_osx_dynamic := $(AsanFunctions) $(AsanCXXFunctions) \
+ $(InterceptionFunctions) \
$(SanitizerCommonFunctions) \
$(AsanDynamicFunctions)
-FUNCTIONS.asan_iossim_dynamic := $(AsanFunctions) $(InterceptionFunctions) \
+FUNCTIONS.asan_iossim_dynamic := $(AsanFunctions) $(AsanCXXFunctions) \
+ $(InterceptionFunctions) \
$(SanitizerCommonFunctions) \
$(AsanDynamicFunctions)
diff --git a/make/platform/clang_linux.mk b/make/platform/clang_linux.mk
index 7612d47ff..b4ee85d34 100644
--- a/make/platform/clang_linux.mk
+++ b/make/platform/clang_linux.mk
@@ -49,23 +49,27 @@ endif
# Build runtime libraries for i386.
ifeq ($(call contains,$(SupportedArches),i386),true)
-Configs += full-i386 profile-i386 san-i386 asan-i386 ubsan-i386 ubsan_cxx-i386
+Configs += full-i386 profile-i386 san-i386 asan-i386 asan_cxx-i386 \
+ ubsan-i386 ubsan_cxx-i386
Arch.full-i386 := i386
Arch.profile-i386 := i386
Arch.san-i386 := i386
Arch.asan-i386 := i386
+Arch.asan_cxx-i386 := i386
Arch.ubsan-i386 := i386
Arch.ubsan_cxx-i386 := i386
endif
# Build runtime libraries for x86_64.
ifeq ($(call contains,$(SupportedArches),x86_64),true)
-Configs += full-x86_64 profile-x86_64 san-x86_64 asan-x86_64 tsan-x86_64 \
- msan-x86_64 ubsan-x86_64 ubsan_cxx-x86_64 dfsan-x86_64 lsan-x86_64
+Configs += full-x86_64 profile-x86_64 san-x86_64 asan-x86_64 asan_cxx-x86_64 \
+ tsan-x86_64 msan-x86_64 ubsan-x86_64 ubsan_cxx-x86_64 dfsan-x86_64 \
+ lsan-x86_64
Arch.full-x86_64 := x86_64
Arch.profile-x86_64 := x86_64
Arch.san-x86_64 := x86_64
Arch.asan-x86_64 := x86_64
+Arch.asan_cxx-x86_64 := x86_64
Arch.tsan-x86_64 := x86_64
Arch.msan-x86_64 := x86_64
Arch.ubsan-x86_64 := x86_64
@@ -96,6 +100,8 @@ CFLAGS.san-i386 := $(CFLAGS) -m32 $(SANITIZER_CFLAGS) -fno-rtti
CFLAGS.san-x86_64 := $(CFLAGS) -m64 $(SANITIZER_CFLAGS) -fno-rtti
CFLAGS.asan-i386 := $(CFLAGS) -m32 $(SANITIZER_CFLAGS) -fno-rtti
CFLAGS.asan-x86_64 := $(CFLAGS) -m64 $(SANITIZER_CFLAGS) -fno-rtti
+CFLAGS.asan_cxx-i386 := $(CFLAGS) -m32 $(SANITIZER_CFLAGS) -fno-rtti
+CFLAGS.asan_cxx-x86_64 := $(CFLAGS) -m64 $(SANITIZER_CFLAGS) -fno-rtti
CFLAGS.tsan-x86_64 := $(CFLAGS) -m64 $(SANITIZER_CFLAGS) -fno-rtti
CFLAGS.msan-x86_64 := $(CFLAGS) -m64 $(SANITIZER_CFLAGS) -fno-rtti
CFLAGS.ubsan-i386 := $(CFLAGS) -m32 $(SANITIZER_CFLAGS) -fno-rtti
@@ -131,8 +137,11 @@ FUNCTIONS.asan-i386 := $(AsanFunctions) $(InterceptionFunctions) \
$(SanitizerCommonFunctions)
FUNCTIONS.asan-x86_64 := $(AsanFunctions) $(InterceptionFunctions) \
$(SanitizerCommonFunctions) $(LsanCommonFunctions)
-FUNCTIONS.asan-arm-android := $(AsanFunctions) $(InterceptionFunctions) \
- $(SanitizerCommonFunctions)
+FUNCTIONS.asan_cxx-i386 := $(AsanCXXFunctions)
+FUNCTIONS.asan_cxx-x86_64 := $(AsanCXXFunctions)
+FUNCTIONS.asan-arm-android := $(AsanFunctions) $(AsanCXXFunctions) \
+ $(InterceptionFunctions) \
+ $(SanitizerCommonFunctions)
FUNCTIONS.tsan-x86_64 := $(TsanFunctions) $(InterceptionFunctions) \
$(SanitizerCommonFunctions)
FUNCTIONS.msan-x86_64 := $(MsanFunctions) $(InterceptionFunctions) \