]> granicus.if.org Git - clang/commitdiff
build/compiler-rt: Fake Clang into using the right assembler to build the ARM
authorDaniel Dunbar <daniel@zuster.org>
Fri, 11 Feb 2011 01:29:49 +0000 (01:29 +0000)
committerDaniel Dunbar <daniel@zuster.org>
Fri, 11 Feb 2011 01:29:49 +0000 (01:29 +0000)
bits for the runtime libraries.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125328 91177308-0d34-0410-b5e6-96231b3b80d8

runtime/Makefile

index 36197224426d6c4f2257698b5ec216b1dd479af5..375f312debd1191395ba8dbf35c58683a58e8ba4 100644 (file)
@@ -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: