summaryrefslogtreecommitdiffstats
path: root/compiler-rt
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
commit74457a715dc78d976e4df77b4c01dc2f1ec8bfca (patch)
treec865b3aef9202815f89bf34df05ffd3df11c0409 /compiler-rt
parent07542c5b2d43d0f88add66acb87a4bdf86df30ea (diff)
downloadbcm5719-llvm-74457a715dc78d976e4df77b4c01dc2f1ec8bfca.tar.gz
bcm5719-llvm-74457a715dc78d976e4df77b4c01dc2f1ec8bfca.zip
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. llvm-svn: 129873
Diffstat (limited to 'compiler-rt')
-rw-r--r--compiler-rt/make/platform/clang_darwin.mk23
1 files changed, 20 insertions, 3 deletions
diff --git a/compiler-rt/make/platform/clang_darwin.mk b/compiler-rt/make/platform/clang_darwin.mk
index cf0e6cbbf39..ed711e0a995 100644
--- a/compiler-rt/make/platform/clang_darwin.mk
+++ b/compiler-rt/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 \
OpenPOWER on IntegriCloud