diff options
| author | Alexey Samsonov <samsonov@google.com> | 2013-01-21 09:13:10 +0000 |
|---|---|---|
| committer | Alexey Samsonov <samsonov@google.com> | 2013-01-21 09:13:10 +0000 |
| commit | 3fd1260155750203f9cb6029ec1f5fa8fc4e4673 (patch) | |
| tree | 35e0f50657229f4666304a243df717966efb756e | |
| parent | a58bcf70a18e9a208f97271dffd82ae82406d084 (diff) | |
| download | bcm5719-llvm-3fd1260155750203f9cb6029ec1f5fa8fc4e4673.tar.gz bcm5719-llvm-3fd1260155750203f9cb6029ec1f5fa8fc4e4673.zip | |
ASan: build runtime flexible mapping and offset in configure+make build as well
llvm-svn: 173016
| -rw-r--r-- | compiler-rt/make/platform/clang_darwin.mk | 8 | ||||
| -rw-r--r-- | compiler-rt/make/platform/clang_linux.mk | 6 |
2 files changed, 9 insertions, 5 deletions
diff --git a/compiler-rt/make/platform/clang_darwin.mk b/compiler-rt/make/platform/clang_darwin.mk index fe84a056592..99039846858 100644 --- a/compiler-rt/make/platform/clang_darwin.mk +++ b/compiler-rt/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/compiler-rt/make/platform/clang_linux.mk b/compiler-rt/make/platform/clang_linux.mk index adfe8917de8..ce763ad96a3 100644 --- a/compiler-rt/make/platform/clang_linux.mk +++ b/compiler-rt/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 |

