summaryrefslogtreecommitdiffstats
path: root/runtime
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2011-02-11 01:29:49 +0000
committerDaniel Dunbar <daniel@zuster.org>2011-02-11 01:29:49 +0000
commitdb0ab63998eb9aad0ead03d3f76f095f9b1eb036 (patch)
treea7fc69ae0c6e71a56e91378bed3add33f42f74a4 /runtime
parent217cacc7f8542a3b87309f30ecfed69cbc4afe04 (diff)
build/compiler-rt: Fake Clang into using the right assembler to build the ARM
bits for the runtime libraries. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125328 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'runtime')
-rw-r--r--runtime/Makefile12
1 files changed, 11 insertions, 1 deletions
diff --git a/runtime/Makefile b/runtime/Makefile
index 3619722442..375f312deb 100644
--- a/runtime/Makefile
+++ b/runtime/Makefile
@@ -28,6 +28,9 @@ PROJ_resources_lib := $(PROJ_resources)/lib
# Expect compiler-rt to be in llvm/projects/compiler-rt
COMPILERRT_SRC_ROOT := $(LLVM_SRC_ROOT)/projects/compiler-rt
+# Additional flags to pass to Clang.
+CLANG_CCFLAGS := -no-integrated-as
+
ifneq ($(CLANG_NO_RUNTIME),1)
ifeq ($(shell test -d $(COMPILERRT_SRC_ROOT) && echo OK),OK)
@@ -40,6 +43,13 @@ RuntimeDirs :=
ifeq ($(OS),Darwin)
RuntimeDirs += darwin
RuntimeLibrary.darwin.Configs = eprintf 10.4 armv6 cc_kext
+
+# On Darwin, fake Clang into using the iOS assembler (since compiler-rt wants to
+# build ARM bits).
+ifeq ($(OS),Darwin)
+CLANG_CCFLAGS += -ccc-install-dir \
+ /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/
+endif
endif
# Rule to build the compiler-rt libraries we need.
@@ -50,7 +60,7 @@ BuildRuntimeLibraries:
$(Verb) $(MAKE) -C $(COMPILERRT_SRC_ROOT) \
ProjSrcRoot=$(COMPILERRT_SRC_ROOT) \
ProjObjRoot=$(PROJ_OBJ_DIR) \
- CC="$(ToolDir)/clang -no-integrated-as" \
+ CC="$(ToolDir)/clang $(CLANG_CCFLAGS)" \
$(RuntimeDirs:%=clang_%)
.PHONY: BuildRuntimeLibraries
CleanRuntimeLibraries: