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
This commit is contained in:
parent
8896ac3cdd
commit
2f78c0d9f9
@ -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"
|
||||
|
@ -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"
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user