Turn on vzeroupper insertion on call boundaries for AVX; it works as far as I know...
[oota-llvm.git] / Makefile.rules
index 7bef65078845e62da1a2d5de960343182c389dd6..3816bbb1a1cbb698f18ee0c30a6061dd6fb72e48 100644 (file)
@@ -81,6 +81,11 @@ LLVMBuildMakeFrag := $(PROJ_OBJ_ROOT)/Makefile.llvmbuild
 LLVMConfigLibraryDependenciesInc := \
        $(PROJ_OBJ_ROOT)/tools/llvm-config-2/LibraryDependencies.inc
 
+# This is for temporary backwards compatibility.
+ifndef TARGET_NATIVE_ARCH
+TARGET_NATIVE_ARCH := $(ARCH)
+endif
+
 # The rule to create the LLVMBuild Makefile fragment as well as the llvm-config
 # library table.
 #
@@ -92,7 +97,7 @@ LLVMConfigLibraryDependenciesInc := \
 $(LLVMBuildMakeFrag): $(PROJ_SRC_ROOT)/Makefile.rules
        $(Echo) Constructing LLVMBuild project information.
        $(Verb) $(LLVMBuildTool) \
-         --native-target "$(ARCH)" \
+         --native-target "$(TARGET_NATIVE_ARCH)" \
          --enable-targets "$(TARGETS_TO_BUILD)" \
          --write-library-table $(LLVMConfigLibraryDependenciesInc) \
          --write-make-fragment $(LLVMBuildMakeFrag)
@@ -522,7 +527,11 @@ ifndef LLVM_TBLGEN
     LLVM_TBLGEN   := $(LLVMToolDir)/llvm-tblgen$(EXEEXT)
   endif
 endif
-LLVM_CONFIG := $(LLVMToolDir)/llvm-config
+ifeq ($(LLVM_CROSS_COMPILING),1)
+  LLVM_CONFIG := $(BuildLLVMToolDir)/llvm-config-2$(BUILD_EXEEXT)
+else
+  LLVM_CONFIG := $(LLVMToolDir)/llvm-config-2$(EXEEXT)
+endif
 ifndef LLVMLD
 LLVMLD    := $(LLVMToolDir)/llvm-ld$(EXEEXT)
 endif