forked from OSchip/llvm-project
Default to use libc++ on OS X 10.9+ and iOS 7+.
llvm-svn: 193934
This commit is contained in:
parent
586af97a30
commit
0f7445b615
|
@ -839,6 +839,12 @@ DerivedArgList *Darwin::TranslateArgs(const DerivedArgList &Args,
|
|||
}
|
||||
}
|
||||
|
||||
// Default to use libc++ on OS X 10.9+ and iOS 7+.
|
||||
if (((isTargetMacOS() && !isMacosxVersionLT(10, 9)) ||
|
||||
(isTargetIPhoneOS() && !isIPhoneOSVersionLT(7, 0))) &&
|
||||
!Args.getLastArg(options::OPT_stdlib_EQ))
|
||||
DAL->AddJoinedArg(0, Opts.getOption(options::OPT_stdlib_EQ), "libc++");
|
||||
|
||||
// Validate the C++ standard library choice.
|
||||
CXXStdlibType Type = GetCXXStdlibType(*DAL);
|
||||
if (Type == ToolChain::CST_Libcxx) {
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
// Test this without pch.
|
||||
// RUN: %clang_cc1 -include %S/cxx-typeid.h -fsyntax-only -verify %s
|
||||
// RUN: %clang_cc1 -include %S/cxx-typeid.h -fsyntax-only -stdlib=libstdc++ -verify %s
|
||||
|
||||
// RUN: %clang_cc1 -x c++-header -emit-pch -o %t.pch %S/cxx-typeid.h
|
||||
// RUN: %clang_cc1 -include-pch %t.pch -fsyntax-only -verify %s
|
||||
// RUN: %clang_cc1 -x c++-header -emit-pch -stdlib=libstdc++ -o %t.pch %S/cxx-typeid.h
|
||||
// RUN: %clang_cc1 -include-pch %t.pch -fsyntax-only -stdlib=libstdc++ -verify %s
|
||||
|
||||
// expected-no-diagnostics
|
||||
|
||||
|
|
Loading…
Reference in New Issue