summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2011-04-20 21:40:37 +0000
committerDaniel Dunbar <daniel@zuster.org>2011-04-20 21:40:37 +0000
commit56026be8c0582ae073c46b47b81856fb425bf977 (patch)
tree8b5dc6c82dd29d40fe74deb9e299b18185b2b9f3
parente2949350bf2516dea221233639c92f4601bb5a32 (diff)
downloadcompiler-rt-56026be8c0582ae073c46b47b81856fb425bf977.tar.gz
clang_darwin: Always set deployment targets when building compiler-rt bits, so
that we don't have a hidden dependency on possible deployment target environment overrides. - Also, add support for an ARM_SDK build variable which points to the isysroot to use for ARM bits. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@129873 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--make/platform/clang_darwin.mk23
1 files changed, 20 insertions, 3 deletions
diff --git a/make/platform/clang_darwin.mk b/make/platform/clang_darwin.mk
index cf0e6cbbf..ed711e0a9 100644
--- a/make/platform/clang_darwin.mk
+++ b/make/platform/clang_darwin.mk
@@ -41,6 +41,26 @@ override CC := $(patsubst -arch_%,,$(CC))
CFLAGS := -Wall -Werror -O3 -fomit-frame-pointer
+# Always set deployment target arguments for every build, these libraries should
+# never depend on the environmental overrides. We simply set them to minimum
+# supported deployment target -- nothing in the compiler-rt libraries should
+# actually depend on the deployment target.
+X86_DEPLOYMENT_ARGS := -mmacosx-version-min=10.4
+ARM_DEPLOYMENT_ARGS := -miphoneos-version-min=1.0
+
+# If an explicit ARM_SDK build variable is set, use that as the isysroot.
+ifneq ($(ARM_SDK),)
+ARM_DEPLOYMENT_ARGS += -isysroot $(ARM_SDK)
+endif
+
+CFLAGS.eprintf := $(CFLAGS) $(X86_DEPLOYMENT_ARGS)
+CFLAGS.10.4 := $(CFLAGS) $(X86_DEPLOYMENT_ARGS)
+CFLAGS.ios := $(CFLAGS) $(ARM_DEPLOYMENT_ARGS)
+CFLAGS.cc_kext.i386 := $(CFLAGS) $(X86_DEPLOYMENT_ARGS)
+CFLAGS.cc_kext.x86_64 := $(CFLAGS) $(X86_DEPLOYMENT_ARGS)
+CFLAGS.cc_kext.armv6 := $(CFLAGS) $(ARM_DEPLOYMENT_ARGS) -mthumb
+CFLAGS.cc_kext.armv7 := $(CFLAGS) $(ARM_DEPLOYMENT_ARGS) -mthumb
+
FUNCTIONS.eprintf := eprintf
FUNCTIONS.10.4 := eprintf floatundidf floatundisf floatundixf
@@ -162,9 +182,6 @@ CCKEXT_ARM_FUNCTIONS := $(CCKEXT_COMMON_FUNCTIONS) \
FUNCTIONS.cc_kext.armv6 := $(CCKEXT_ARM_FUNCTIONS)
FUNCTIONS.cc_kext.armv7 := $(CCKEXT_ARM_FUNCTIONS)
-CFLAGS.cc_kext.armv6 := $(CFLAGS) -mthumb
-CFLAGS.cc_kext.armv7 := $(CFLAGS) -mthumb
-
CCKEXT_X86_FUNCTIONS := $(CCKEXT_COMMON_FUNCTIONS) \
divxc3 \
fixunsxfdi \