summaryrefslogtreecommitdiff
path: root/make
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2011-12-01 23:35:59 +0000
committerDaniel Dunbar <daniel@zuster.org>2011-12-01 23:35:59 +0000
commitf8328c56b93ccbb11ce2e77e066c25536204d31b (patch)
tree094c7a0f355b98db45bd89fd1bb7eaf40fc6492a /make
parentcc080e5c0bac825d72b8928a2235716b0344ac43 (diff)
downloadcompiler-rt-f8328c56b93ccbb11ce2e77e066c25536204d31b.tar.gz
compiler-rt-f8328c56b93ccbb11ce2e77e066c25536204d31b.tar.bz2
compiler-rt-f8328c56b93ccbb11ce2e77e066c25536204d31b.tar.xz
platform/clang_darwin: Add asan runtime library configuration.
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@145649 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'make')
-rw-r--r--make/platform/clang_darwin.mk16
1 files changed, 16 insertions, 0 deletions
diff --git a/make/platform/clang_darwin.mk b/make/platform/clang_darwin.mk
index 76d127d7..05014b9e 100644
--- a/make/platform/clang_darwin.mk
+++ b/make/platform/clang_darwin.mk
@@ -60,6 +60,12 @@ UniversalArchs.profile_osx := $(call CheckArches,i386 x86_64)
Configs += profile_ios
UniversalArchs.profile_ios := $(call CheckArches,i386 x86_64 armv6 armv7)
+# Configurations which define the ASAN support functions.
+#
+# Note that ASAN doesn't appear to currently support i386.
+Configs += asan_osx
+UniversalArchs.asan_osx := $(call CheckArches,x86_64)
+
# If RC_SUPPORTED_ARCHS is defined, treat it as a list of the architectures we
# are intended to support and limit what we try to build to that.
#
@@ -96,6 +102,14 @@ 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.4
+CFLAGS.asan_osx += \
+ -DASAN_USE_SYSINFO=1 \
+ -DASAN_NEEDS_SEGV=1 \
+ -DASAN_HAS_EXCEPTIONS=1 \
+ -DASAN_FLEXIBLE_MAPPING_AND_OFFSET=0 \
+
CFLAGS.ios.i386 := $(CFLAGS) $(IOSSIM_DEPLOYMENT_ARGS)
CFLAGS.ios.x86_64 := $(CFLAGS) $(IOSSIM_DEPLOYMENT_ARGS)
CFLAGS.ios.armv6 := $(CFLAGS) $(IOS_DEPLOYMENT_ARGS)
@@ -132,6 +146,8 @@ FUNCTIONS.osx := mulosi4 mulodi4 muloti4
FUNCTIONS.profile_osx := GCDAProfiling
FUNCTIONS.profile_ios := GCDAProfiling
+FUNCTIONS.asan_osx := $(AsanFunctions)
+
CCKEXT_COMMON_FUNCTIONS := \
absvdi2 \
absvsi2 \