Improve support for cross-hosted builds of LLVM.
authorShantonu Sen <ssen@apple.com>
Wed, 2 Sep 2009 23:52:23 +0000 (23:52 +0000)
committerShantonu Sen <ssen@apple.com>
Wed, 2 Sep 2009 23:52:23 +0000 (23:52 +0000)
--build=triple and other configure options are passed
to the BuildTools/ sub-invocation more consistently

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

Makefile
Makefile.config.in

index 5d10f8e237f1ea3448444c16ce10acc75b2f34cb..b8d4367e72be2bca3a8b497673eb7823179d8a33 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -88,10 +88,19 @@ cross-compile-build-tools:
        $(Verb) if [ ! -f BuildTools/Makefile ]; then \
           $(MKDIR) BuildTools; \
          cd BuildTools ; \
-         $(PROJ_SRC_DIR)/configure ; \
+         $(PROJ_SRC_DIR)/configure --build=$(BUILD_TRIPLE) \
+               --host=$(BUILD_TRIPLE) --target=$(BUILD_TRIPLE); \
          cd .. ; \
        fi; \
-        ($(MAKE) -C BuildTools BUILD_DIRS_ONLY=1 ) || exit 1;
+        ($(MAKE) -C BuildTools \
+         BUILD_DIRS_ONLY=1 \
+         UNIVERSAL= \
+         ENABLE_OPTIMIZED=$(ENABLE_OPTIMIZED) \
+         ENABLE_PROFILING=$(ENABLE_PROFILING) \
+         ENABLE_COVERAGE=$(ENABLE_COVERAGE) \
+         DISABLE_ASSERTIONS=$(DISABLE_ASSERTIONS) \
+         ENABLE_EXPENSIVE_CHECKS=$(ENABLE_EXPENSIVE_CHECKS) \
+       ) || exit 1;
 endif
 
 # Include the main makefile machinery.
index ecd05957d9dde3714cac1961fc200cd583d11a6f..bb68e4c2d36fabda9760d9048aaad5d60a5828a0 100644 (file)
@@ -110,6 +110,9 @@ BUILD_EXEEXT=@BUILD_EXEEXT@
 BUILD_CC=@BUILD_CC@
 BUILD_CXX=@BUILD_CXX@
 
+# Triple for configuring build tools when cross-compiling
+BUILD_TRIPLE=@build@
+
 # Target triple (cpu-vendor-os) for which we should generate code
 TARGET_TRIPLE=@target@