From 2f78c0d9f98ec85ae8c5336aae107b5f938d571f Mon Sep 17 00:00:00 2001 From: Marshall Clow Date: Tue, 14 Jan 2014 17:00:40 +0000 Subject: [PATCH] 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++. git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@199222 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/buildit | 9 +++++++-- test/testit | 6 +++++- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/lib/buildit b/lib/buildit index af6b4668c..00f0adfe9 100755 --- a/lib/buildit +++ b/lib/buildit @@ -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" diff --git a/test/testit b/test/testit index 18b081453..beb07a2a6 100755 --- a/test/testit +++ b/test/testit @@ -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"