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++.

llvm-svn: 199222
This commit is contained in:
Marshall Clow 2014-01-14 17:00:40 +00:00
parent 9d176af731
commit 4cdc6feb4f
2 changed files with 12 additions and 3 deletions

View File

@ -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"

View File

@ -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"