summaryrefslogtreecommitdiff
path: root/make
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2012-11-13 23:55:06 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2012-11-13 23:55:06 +0000
commit4a4ef702597471bff5e249b8ec9d94d265007895 (patch)
tree0cb77e741629a2a637a7e761cee5bd8afd38e51d /make
parentf4932204d7cf89cc2402b1e30fb728cf84ff7b7f (diff)
downloadcompiler-rt-4a4ef702597471bff5e249b8ec9d94d265007895.tar.gz
compiler-rt-4a4ef702597471bff5e249b8ec9d94d265007895.tar.bz2
compiler-rt-4a4ef702597471bff5e249b8ec9d94d265007895.tar.xz
Support for building the ubsan runtime when using the autoconf build system on
Darwin. Patch by Jean-Daniel Dupas, tweaked by Jonathan Sauer, simplified somewhat by me. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@167889 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'make')
-rw-r--r--make/platform/clang_darwin.mk7
1 files changed, 7 insertions, 0 deletions
diff --git a/make/platform/clang_darwin.mk b/make/platform/clang_darwin.mk
index 5bc0e106..399edee0 100644
--- a/make/platform/clang_darwin.mk
+++ b/make/platform/clang_darwin.mk
@@ -76,6 +76,9 @@ UniversalArchs.asan_osx := $(call CheckArches,i386 x86_64,asan_osx)
Configs += asan_osx_dynamic
UniversalArchs.asan_osx_dynamic := $(call CheckArches,i386 x86_64,asan_osx_dynamic)
+Configs += ubsan_osx
+UniversalArchs.ubsan_osx := $(call CheckArches,i386 x86_64,ubsan_osx)
+
# Darwin 10.6 has a bug in cctools that makes it unable to use ranlib on our ARM
# object files. If we are on that platform, strip out all ARM archs. We still
# build the libraries themselves so that Clang can find them where it expects
@@ -131,6 +134,8 @@ CFLAGS.asan_osx_dynamic := \
$(CFLAGS) -mmacosx-version-min=10.5 -fno-builtin \
-DMAC_INTERPOSE_FUNCTIONS=1
+CFLAGS.ubsan_osx := $(CFLAGS) $(OSX_DEPLOYMENT_ARGS)
+
CFLAGS.ios.i386 := $(CFLAGS) $(IOSSIM_DEPLOYMENT_ARGS)
CFLAGS.ios.x86_64 := $(CFLAGS) $(IOSSIM_DEPLOYMENT_ARGS)
CFLAGS.ios.armv7 := $(CFLAGS) $(IOS_DEPLOYMENT_ARGS)
@@ -183,6 +188,8 @@ FUNCTIONS.asan_osx_dynamic := $(AsanFunctions) $(InterceptionFunctions) \
$(SanitizerCommonFunctions) \
$(AsanDynamicFunctions)
+FUNCTIONS.ubsan_osx := $(UbsanFunctions)
+
CCKEXT_COMMON_FUNCTIONS := \
absvdi2 \
absvsi2 \