summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--clang/CMakeLists.txt4
-rw-r--r--clang/lib/Driver/ToolChain.cpp2
2 files changed, 4 insertions, 2 deletions
diff --git a/clang/CMakeLists.txt b/clang/CMakeLists.txt
index cfcd2212cfa..417b2c6af7a 100644
--- a/clang/CMakeLists.txt
+++ b/clang/CMakeLists.txt
@@ -193,11 +193,11 @@ set(ENABLE_X86_RELAX_RELOCATIONS OFF CACHE BOOL
"enable x86 relax relocations by default")
set(CLANG_DEFAULT_CXX_STDLIB "" CACHE STRING
- "Default C++ stdlib to use (empty for architecture default, \"libstdc++\" or \"libc++\"")
+ "Default C++ stdlib to use (empty for platform default, \"libstdc++\" or \"libc++\"")
if (NOT(CLANG_DEFAULT_CXX_STDLIB STREQUAL "" OR
CLANG_DEFAULT_CXX_STDLIB STREQUAL "libstdc++" OR
CLANG_DEFAULT_CXX_STDLIB STREQUAL "libc++"))
- message(WARNING "Resetting default C++ stdlib to use architecture default")
+ message(WARNING "Resetting default C++ stdlib to use platform default")
set(CLANG_DEFAULT_CXX_STDLIB "")
endif()
diff --git a/clang/lib/Driver/ToolChain.cpp b/clang/lib/Driver/ToolChain.cpp
index b4491d6a556..66b76cda14a 100644
--- a/clang/lib/Driver/ToolChain.cpp
+++ b/clang/lib/Driver/ToolChain.cpp
@@ -577,6 +577,8 @@ ToolChain::CXXStdlibType ToolChain::GetCXXStdlibType(const ArgList &Args) const{
<< A->getAsString(Args);
}
+ // If no argument was provided or its value was invalid, look for the
+ // default unless forced or configured to take the platform default.
if (!HasValidType && (ForcePlatformDefault ||
!ParseCXXStdlibType(CLANG_DEFAULT_CXX_STDLIB, Type)))
Type = GetDefaultCXXStdlibType();
OpenPOWER on IntegriCloud