Update description for CLANG_DEFAULT_CXX_STDLIB and add comment. NFC

We agreed to call it "platform default" instead of "architecture default".
(see D17286)

llvm-svn: 276618
This commit is contained in:
Jonas Hahnfeld 2016-07-25 08:04:26 +00:00
parent dc816da455
commit ebf866213c
2 changed files with 4 additions and 2 deletions

View File

@ -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()

View File

@ -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();