]> granicus.if.org Git - clang/commitdiff
Darwin: fix stdlib handling when CLANG_DEFAULT_STDLIB is set
authorTim Northover <tnorthover@apple.com>
Mon, 15 Feb 2016 16:38:10 +0000 (16:38 +0000)
committerTim Northover <tnorthover@apple.com>
Mon, 15 Feb 2016 16:38:10 +0000 (16:38 +0000)
I'd accidentally skipped the CMake check in a premature optimisation. I'd also
put the original test in completely the wrong place.

Thanks Jonas Hahnfeld!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@260898 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Driver/ToolChains.cpp
test/Driver/darwin-stdlib.cpp [moved from darwin-stdlib.cpp with 100% similarity]

index ae24e4731b73ed4f059acbaa3c56c2f70e7d8d8e..6c5cdb275971c0d22edf135a1911376946cc4baa 100644 (file)
@@ -1060,7 +1060,7 @@ DerivedArgList *Darwin::TranslateArgs(const DerivedArgList &Args,
   }
 
   if (!Args.getLastArg(options::OPT_stdlib_EQ) &&
-      GetDefaultCXXStdlibType() == ToolChain::CST_Libcxx)
+      GetCXXStdlibType(Args) == ToolChain::CST_Libcxx)
     DAL->AddJoinedArg(nullptr, Opts.getOption(options::OPT_stdlib_EQ),
                       "libc++");