[libcxx] r199222 - Update lib/buildit and test/testit to both pay attention to an env flag CXX_LANG, which people can set to 'c++03', 'c++11' or 'c++1y' to build/test using that language variant. If you don't set this env variable, you get c++11, just like today. Drive-by fix; remove duplicate -nostdinc++.

Marshall Clow mclow.lists at gmail.com
Tue Jan 14 09:00:41 PST 2014


Author: marshall
Date: Tue Jan 14 11:00:40 2014
New Revision: 199222

URL: http://llvm.org/viewvc/llvm-project?rev=199222&view=rev
Log:
Update lib/buildit and test/testit to both pay attention to an env flag CXX_LANG, which people can set to 'c++03', 'c++11' or 'c++1y' to build/test using that language variant. If you don't set this env variable, you get c++11, just like today. Drive-by fix; remove duplicate -nostdinc++.

Modified:
    libcxx/trunk/lib/buildit
    libcxx/trunk/test/testit

Modified: libcxx/trunk/lib/buildit
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/lib/buildit?rev=199222&r1=199221&r2=199222&view=diff
==============================================================================
--- libcxx/trunk/lib/buildit (original)
+++ libcxx/trunk/lib/buildit Tue Jan 14 11:00:40 2014
@@ -17,6 +17,11 @@ then
     CXX=clang++
 fi
 
+if [ -z "$CXX_LANG" ]
+then
+    CXX_LANG=c++1y
+fi
+
 if [ -z "$CC" ]
 then
     CC=clang
@@ -35,7 +40,7 @@ then
   RC_ProjectSourceVersion=1
 fi
 
-EXTRA_FLAGS="-nostdinc++ -std=c++11 -fstrict-aliasing -Wall -Wextra -Wshadow -Wconversion \
+EXTRA_FLAGS="-nostdinc++ -std=${CXX_LANG} -fstrict-aliasing -Wall -Wextra -Wshadow -Wconversion \
              -Wpadded -Wstrict-aliasing=2 -Wstrict-overflow=4 "
 
 case $TRIPLE in
@@ -58,7 +63,7 @@ case $TRIPLE in
     else
         if [ -n "$SDKROOT" ]
         then
-            EXTRA_FLAGS+="-nostdinc++ -isysroot ${SDKROOT}"
+            EXTRA_FLAGS+="-isysroot ${SDKROOT} "
             if echo "${RC_ARCHS}" | grep -q "armv7"  
             then
                 RE_EXPORT_LINE="${SDKROOT}/usr/lib/libc++abi.dylib -Wl,-reexported_symbols_list,libc++sjlj-abi.exp"

Modified: libcxx/trunk/test/testit
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/testit?rev=199222&r1=199221&r2=199222&view=diff
==============================================================================
--- libcxx/trunk/test/testit (original)
+++ libcxx/trunk/test/testit Tue Jan 14 11:00:40 2014
@@ -36,9 +36,13 @@ then
 	fi
 fi
 
+if [ -z "$CXX_LANG" ]
+then
+    CXX_LANG=c++1y
+fi
 if [ -z "$OPTIONS" ]
 then
-	OPTIONS="-std=c++11 -stdlib=libc++"
+	OPTIONS="-std=${CXX_LANG} -stdlib=libc++"
 fi
 OPTIONS="$OPTIONS -I$LIBCXX_ROOT/test/support"
 





More information about the cfe-commits mailing list