[llvm-branch-commits] [cfe-branch] r116526 - /cfe/branches/Apple/whitney-IB/ClangBNI.mk

Daniel Dunbar daniel at zuster.org
Thu Oct 14 15:00:22 PDT 2010


Author: ddunbar
Date: Thu Oct 14 17:00:22 2010
New Revision: 116526

URL: http://llvm.org/viewvc/llvm-project?rev=116526&view=rev
Log:
Automatically use /Developer/usr/bin/clang as our stage1 compiler if it is
clang-115 or greater -- we have been bootstrapping nicely for a while now.

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

Modified: cfe/branches/Apple/whitney-IB/ClangBNI.mk
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/Apple/whitney-IB/ClangBNI.mk?rev=116526&r1=116525&r2=116526&view=diff
==============================================================================
--- cfe/branches/Apple/whitney-IB/ClangBNI.mk (original)
+++ cfe/branches/Apple/whitney-IB/ClangBNI.mk Thu Oct 14 17:00:22 2010
@@ -224,7 +224,20 @@
 Configure_Flags = $(Common_Configure_Flags) \
                   --with-extra-options="$(Extra_Options) $(Clang_Final_Extra_Options)"
 
-# Select stage1 compiler.
+# Determine the /Developer/usr/bin/clang major build version number
+SysClangMajorBuildVersion := \
+  $(shell /Developer/usr/bin/clang -v 2>&1 | \
+	head -1 | \
+	sed -e "s at .*\(clang-[0-9]*\).*@\1@" \
+	    -e "s@\$$@-@" | \
+	cut -d- -f2 | \
+	cut -d. -f1)
+ifeq ($(shell test $(SysClangMajorBuildVersion) -ge 115 && echo OK),OK)
+CC := /Developer/usr/bin/clang
+CXX := /Developer/usr/bin/clang++
+endif
+
+# Set stage1 compiler.
 Stage1_CC := $(CC)
 Stage1_CXX := $(CXX)
 





More information about the llvm-branch-commits mailing list