summaryrefslogtreecommitdiffstats
path: root/clang/runtime
diff options
context:
space:
mode:
authorBob Wilson <bob.wilson@apple.com>2014-11-10 17:46:55 +0000
committerBob Wilson <bob.wilson@apple.com>2014-11-10 17:46:55 +0000
commit94794d08b94a8329d3f833ef0d2ac01938dd9cce (patch)
treeff0fb24604e1c0b712bd55e30eddb3b45566ede0 /clang/runtime
parentccde2a9a1ec88d2ca7358dd5c51ff9c5c2d87d69 (diff)
downloadbcm5719-llvm-94794d08b94a8329d3f833ef0d2ac01938dd9cce.tar.gz
bcm5719-llvm-94794d08b94a8329d3f833ef0d2ac01938dd9cce.zip
Only build iOS runtime libraries when the iOS SDKs are available.
This was already set up for the iOS simulator ASan dylib simulator, and this change extends that to the other iOS runtime libraries. This is in preparation for building all those iOS libraries against the real SDKs instead of the fake SDKs in compiler-rt. llvm-svn: 221614
Diffstat (limited to 'clang/runtime')
-rw-r--r--clang/runtime/compiler-rt/Makefile23
1 files changed, 17 insertions, 6 deletions
diff --git a/clang/runtime/compiler-rt/Makefile b/clang/runtime/compiler-rt/Makefile
index 0211f503351..7e2e2a8597e 100644
--- a/clang/runtime/compiler-rt/Makefile
+++ b/clang/runtime/compiler-rt/Makefile
@@ -80,11 +80,26 @@ RuntimeDirs :=
ifeq ($(OS),Darwin)
RuntimeDirs += darwin macho_embedded
RuntimeLibrary.darwin.Configs := \
- eprintf.a 10.4.a osx.a ios.a cc_kext.a cc_kext_ios5.a \
+ eprintf.a 10.4.a osx.a cc_kext.a \
asan_osx_dynamic.dylib \
- profile_osx.a profile_ios.a \
+ profile_osx.a \
ubsan_osx.a
+IOS_SDK := $(shell xcrun --show-sdk-path -sdk iphoneos 2> /dev/null)
+IOSSIM_SDK := $(shell xcrun --show-sdk-path -sdk iphonesimulator 2> /dev/null)
+
+ifneq ($(IOS_SDK)$(IOSSIM_SDK),)
+RuntimeLibrary.darwin.Configs += ios.a profile_ios.a
+endif
+
+ifneq ($(IOS_SDK),)
+RuntimeLibrary.darwin.Configs += cc_kext_ios5.a
+endif
+
+ifneq ($(IOSSIM_SDK),)
+RuntimeLibrary.darwin.Configs += asan_iossim_dynamic.dylib
+endif
+
RuntimeLibrary.macho_embedded.Configs := \
hard_static.a hard_pic.a
ifneq (,$(findstring ARM,$(TARGETS_TO_BUILD)))
@@ -101,10 +116,6 @@ ACTIVE_SDK_PATH := $(shell xcrun --show-sdk-path 2> /dev/null)
ifneq ($(ACTIVE_SDK_PATH),)
COMPILERRT_MAKE_FLAGS := SDKROOT=$(ACTIVE_SDK_PATH)
endif
-IOSSIM_SDK_PATH := $(shell xcrun --show-sdk-path -sdk iphonesimulator 2> /dev/null)
-ifneq ($(IOSSIM_SDK_PATH),)
-RuntimeLibrary.darwin.Configs += asan_iossim_dynamic.dylib
-endif
endif
OpenPOWER on IntegriCloud