summaryrefslogtreecommitdiff
path: root/make
diff options
context:
space:
mode:
authorAlexey Samsonov <samsonov@google.com>2013-01-21 09:13:10 +0000
committerAlexey Samsonov <samsonov@google.com>2013-01-21 09:13:10 +0000
commit583336e293ed718109ab2fe0dc4197be9cba6c52 (patch)
treeaa89d6dcbd75b1dd629ba6b59b674e9049018b86 /make
parenta0a69a4129fc963702b7f96a00838f104a6b3636 (diff)
ASan: build runtime flexible mapping and offset in configure+make build as well
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@173016 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'make')
-rw-r--r--make/platform/clang_darwin.mk8
-rw-r--r--make/platform/clang_linux.mk6
2 files changed, 9 insertions, 5 deletions
diff --git a/make/platform/clang_darwin.mk b/make/platform/clang_darwin.mk
index fe84a0565..990398468 100644
--- a/make/platform/clang_darwin.mk
+++ b/make/platform/clang_darwin.mk
@@ -129,10 +129,12 @@ IOSSIM_DEPLOYMENT_ARGS += -isysroot $(ProjSrcRoot)/SDKs/darwin
CFLAGS.eprintf := $(CFLAGS) $(OSX_DEPLOYMENT_ARGS)
CFLAGS.10.4 := $(CFLAGS) $(OSX_DEPLOYMENT_ARGS)
# FIXME: We can't build ASAN with our stub SDK yet.
-CFLAGS.asan_osx := $(CFLAGS) -mmacosx-version-min=10.5 -fno-builtin
+CFLAGS.asan_osx := $(CFLAGS) -mmacosx-version-min=10.5 -fno-builtin \
+ -DASAN_FLEXIBLE_MAPPING_AND_OFFSET=1
CFLAGS.asan_osx_dynamic := \
$(CFLAGS) -mmacosx-version-min=10.5 -fno-builtin \
- -DMAC_INTERPOSE_FUNCTIONS=1
+ -DMAC_INTERPOSE_FUNCTIONS=1 \
+ -DASAN_FLEXIBLE_MAPPING_AND_OFFSET=1
CFLAGS.ubsan_osx := $(CFLAGS) -mmacosx-version-min=10.5 -fno-builtin
@@ -165,7 +167,7 @@ CFLAGS.profile_ios.armv7s := $(CFLAGS) $(IOS_DEPLOYMENT_ARGS)
# Configure the asan_osx_dynamic library to be built shared.
SHARED_LIBRARY.asan_osx_dynamic := 1
-LDFLAGS.asan_osx_dynamic := -framework Foundation -lstdc++
+LDFLAGS.asan_osx_dynamic := -framework Foundation -lstdc++ -undefined dynamic_lookup
FUNCTIONS.eprintf := eprintf
FUNCTIONS.10.4 := eprintf floatundidf floatundisf floatundixf
diff --git a/make/platform/clang_linux.mk b/make/platform/clang_linux.mk
index adfe8917d..ce763ad96 100644
--- a/make/platform/clang_linux.mk
+++ b/make/platform/clang_linux.mk
@@ -84,8 +84,10 @@ CFLAGS.full-i386 := $(CFLAGS) -m32
CFLAGS.full-x86_64 := $(CFLAGS) -m64
CFLAGS.profile-i386 := $(CFLAGS) -m32
CFLAGS.profile-x86_64 := $(CFLAGS) -m64
-CFLAGS.asan-i386 := $(CFLAGS) -m32 -fPIE -fno-builtin
-CFLAGS.asan-x86_64 := $(CFLAGS) -m64 -fPIE -fno-builtin
+CFLAGS.asan-i386 := $(CFLAGS) -m32 -fPIE -fno-builtin \
+ -DASAN_FLEXIBLE_MAPPING_AND_OFFSET=1
+CFLAGS.asan-x86_64 := $(CFLAGS) -m64 -fPIE -fno-builtin \
+ -DASAN_FLEXIBLE_MAPPING_AND_OFFSET=1
CFLAGS.tsan-x86_64 := $(CFLAGS) -m64 -fPIE -fno-builtin
CFLAGS.ubsan-i386 := $(CFLAGS) -m32 -fPIE -fno-builtin
CFLAGS.ubsan-x86_64 := $(CFLAGS) -m64 -fPIE -fno-builtin