From: Daniel Dunbar Date: Fri, 11 Feb 2011 01:29:49 +0000 (+0000) Subject: build/compiler-rt: Fake Clang into using the right assembler to build the ARM X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=db0ab63998eb9aad0ead03d3f76f095f9b1eb036;p=clang 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 --- 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: