[llvm-branch-commits] [cfe-branch] r109136 - /cfe/branches/Apple/williamson-IB/ClangBNI.mk

Daniel Dunbar daniel at zuster.org
Thu Jul 22 13:55:42 PDT 2010


Author: ddunbar
Date: Thu Jul 22 15:55:42 2010
New Revision: 109136

URL: http://llvm.org/viewvc/llvm-project?rev=109136&view=rev
Log:
Sync with Whitney.

Modified:
    cfe/branches/Apple/williamson-IB/ClangBNI.mk

Modified: cfe/branches/Apple/williamson-IB/ClangBNI.mk
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/Apple/williamson-IB/ClangBNI.mk?rev=109136&r1=109135&r2=109136&view=diff
==============================================================================
--- cfe/branches/Apple/williamson-IB/ClangBNI.mk (original)
+++ cfe/branches/Apple/williamson-IB/ClangBNI.mk Thu Jul 22 15:55:42 2010
@@ -179,15 +179,19 @@
 Clang_Make_Variables += LLVM_LTO_VERSION_OFFSET=3000
 
 # Set configure flags.
-Configure_Flags = --enable-targets=$(LLVM_Backends) \
+Common_Configure_Flags = \
+		  --enable-targets=$(LLVM_Backends) \
 		  --enable-optimized \
 		  --disable-timestamps \
 		  $(Assertions_Configure_Flag) \
                   --with-optimize-option="$(Clang_Optimize_Option)" \
-                  --with-extra-options="$(Clang_Extra_Options)" \
 		  --without-llvmgcc --without-llvmgxx \
 		  --disable-bindings \
 		  --disable-doxygen
+Stage1_Configure_Flags = $(Common_Configure_Flags) \
+                  --with-extra-options="$(Clang_Extra_Options)"
+Configure_Flags = $(Common_Configure_Flags) \
+                  --with-extra-options="$(Clang_Extra_Options) $(Clang_Final_Extra_Options)"
 
 # Set up any additional Clang install targets.
 Extra_Clang_Install_Targets :=
@@ -206,6 +210,11 @@
 $(error "unknown value for post install of open source license: '$(Post_Install_OpenSourceLicense)'")
 endif
 
+# Select stage1 compiler to build.
+ifeq ($(Clang_Enable_Bootstrap), 1)
+Stage1_Compiler_Arch := $(lastword $(RC_ARCHS))
+endif
+
 # Select final configure target for clang builds.
 ifeq ($(Clang_Enable_Bootstrap), 1)
 Final_Configure_Target := configure-clang_stage2
@@ -369,15 +378,13 @@
 build-clang_final: configure-clang_final
 	$(_v) for arch in $(RC_ARCHS) ; do \
 		echo "Building (Final) for $$arch..." && \
-		$(MAKE) -j$(SYSCTL) -C $(OBJROOT)/$$arch $(Build_Target) || exit 1; \
+		time $(MAKE) -j$(SYSCTL) -C $(OBJROOT)/$$arch $(Build_Target) || exit 1; \
 	done
 
 build-clang_stage1: configure-clang_stage1
-	$(_v) for arch in $(RC_ARCHS) ; do \
-		echo "Building (Stage 1) for $$arch..." && \
-		$(MAKE) -j$(SYSCTL) -C $(OBJROOT)/stage1-$$arch $(Build_Target_Stage1) || exit 1; \
-		$(MAKE) -j$(SYSCTL) -C $(OBJROOT)/stage1-$$arch $(Install_Target_Stage1) || exit 1; \
-	done
+	$(_v) echo "Building (Stage 1) for $(Stage1_Compiler_Arch)..."
+	$(_v) time $(MAKE) -j$(SYSCTL) -C $(OBJROOT)/stage1-$(Stage1_Compiler_Arch) $(Build_Target_Stage1)
+	$(_v) time $(MAKE) -j$(SYSCTL) -C $(OBJROOT)/stage1-$(Stage1_Compiler_Arch) $(Install_Target_Stage1)
 
 configure-clang_final: $(Final_Configure_Target)
 
@@ -387,9 +394,9 @@
 		echo "Configuring (Final) for $$arch..." && \
 		$(MKDIR) $(OBJROOT)/$$arch && \
 		cd $(OBJROOT)/$$arch && \
-		$(Configure) --prefix="$(Install_Prefix)" $(Configure_Flags) \
-		  CC="$(OBJROOT)/stage1-install-$$arch/bin/clang -arch $$arch" \
-		  CXX="$(OBJROOT)/stage1-install-$$arch/bin/clang++ -arch $$arch" || exit 1 ; \
+		time $(Configure) --prefix="$(Install_Prefix)" $(Configure_Flags) \
+		  CC="$(OBJROOT)/stage1-install-$(Stage1_Compiler_Arch)/bin/clang -arch $$arch" \
+		  CXX="$(OBJROOT)/stage1-install-$(Stage1_Compiler_Arch)/bin/clang++ -arch $$arch" || exit 1 ; \
 	done
 
 configure-clang_singlestage:
@@ -398,20 +405,18 @@
 		echo "Configuring (Final) for $$arch..." && \
 		$(MKDIR) $(OBJROOT)/$$arch && \
 		cd $(OBJROOT)/$$arch && \
-		$(Configure) --prefix="$(Install_Prefix)" $(Configure_Flags) \
+		time $(Configure) --prefix="$(Install_Prefix)" $(Configure_Flags) \
 		  CC="$(CC) -arch $$arch" \
 		  CXX="$(CXX) -arch $$arch" || exit 1 ; \
 	done
 
 configure-clang_stage1: 
 	$(_v) $(MKDIR) $(OBJROOT)
-	$(_v) for arch in $(RC_ARCHS) ; do \
-		echo "Configuring (Stage 1) for $$arch..." && \
-		$(MKDIR) $(OBJROOT)/stage1-$$arch && \
-		cd $(OBJROOT)/stage1-$$arch && \
-		$(Configure) --prefix="$(OBJROOT)/stage1-install-$$arch" $(Configure_Flags) \
-		  CC="$(CC) -arch $$arch" CXX="$(CXX) -arch $$arch" || exit 1 ; \
-	done
+	$(_v) echo "Configuring (Stage 1) for $(Stage1_Compiler_Arch)..."
+	$(_v) $(MKDIR) $(OBJROOT)/stage1-$(Stage1_Compiler_Arch)
+	$(_v) cd $(OBJROOT)/stage1-$(Stage1_Compiler_Arch) && \
+	      time $(Configure) --prefix="$(OBJROOT)/stage1-install-$(Stage1_Compiler_Arch)" $(Stage1_Configure_Flags) \
+	        CC="$(CC) -arch $(Stage1_Compiler_Arch)" CXX="$(CXX) -arch $(Stage1_Compiler_Arch)" || exit 1
 
 install-clang-rootlinks: install-clang_final
 	$(MKDIR) -p $(DSTROOT)/usr/bin





More information about the llvm-branch-commits mailing list