summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2011-11-12 00:18:02 +0000
committerDaniel Dunbar <daniel@zuster.org>2011-11-12 00:18:02 +0000
commita7de1d67b2c57153732c394172a64d157c80988e (patch)
tree6f33295f40d6fea6726acc35bd904bdc7cb9d6e8
parent0e3642a58746a26f50709179a2bcb25f335e2dac (diff)
downloadllvm-a7de1d67b2c57153732c394172a64d157c80988e.tar.gz
llvm-a7de1d67b2c57153732c394172a64d157c80988e.tar.bz2
llvm-a7de1d67b2c57153732c394172a64d157c80988e.tar.xz
build/Make: Define a TARGET_NATIVE_ARCH variable to be a bit more precise than
ARCH, which gets tested in many more contexts. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@144434 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--Makefile2
-rw-r--r--Makefile.config.in1
-rw-r--r--Makefile.rules7
3 files changed, 8 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index a08818c210..0ef6fb4fbb 100644
--- a/Makefile
+++ b/Makefile
@@ -126,7 +126,7 @@ cross-compile-build-tools:
$(MAKE) -C BuildTools \
BUILD_DIRS_ONLY=1 \
UNIVERSAL= \
- ARCH="$(ARCH)" \
+ TARGET_NATIVE_ARCH="$(TARGET_NATIVE_ARCH)" \
TARGETS_TO_BUILD="$(TARGETS_TO_BUILD)" \
ENABLE_OPTIMIZED=$(ENABLE_OPTIMIZED) \
ENABLE_PROFILING=$(ENABLE_PROFILING) \
diff --git a/Makefile.config.in b/Makefile.config.in
index 47044a3a8d..dd948bf1f3 100644
--- a/Makefile.config.in
+++ b/Makefile.config.in
@@ -107,6 +107,7 @@ TARGET_OS=@TARGET_OS@
# Target hardware architecture
ARCH=@ARCH@
+TARGET_NATIVE_ARCH := $(ARCH)
# Indicates, whether we're cross-compiling LLVM or not
LLVM_CROSS_COMPILING=@LLVM_CROSS_COMPILING@
diff --git a/Makefile.rules b/Makefile.rules
index 7bef650788..e5719b329a 100644
--- a/Makefile.rules
+++ b/Makefile.rules
@@ -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)