r260898 - Darwin: fix stdlib handling when CLANG_DEFAULT_STDLIB is set

Tim Northover via cfe-commits cfe-commits at lists.llvm.org
Mon Feb 15 08:38:11 PST 2016


Author: tnorthover
Date: Mon Feb 15 10:38:10 2016
New Revision: 260898

URL: http://llvm.org/viewvc/llvm-project?rev=260898&view=rev
Log:
Darwin: fix stdlib handling when CLANG_DEFAULT_STDLIB is set

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!

Added:
    cfe/trunk/test/Driver/darwin-stdlib.cpp
      - copied, changed from r260882, cfe/trunk/darwin-stdlib.cpp
Removed:
    cfe/trunk/darwin-stdlib.cpp
Modified:
    cfe/trunk/lib/Driver/ToolChains.cpp

Removed: cfe/trunk/darwin-stdlib.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/darwin-stdlib.cpp?rev=260897&view=auto
==============================================================================
--- cfe/trunk/darwin-stdlib.cpp (original)
+++ cfe/trunk/darwin-stdlib.cpp (removed)
@@ -1,16 +0,0 @@
-// RUN: %clang -target x86_64-apple-darwin -arch arm64 -miphoneos-version-min=7.0 %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-LIBCXX
-// RUN: %clang -target x86_64-apple-darwin -mmacosx-version-min=10.8 %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-LIBSTDCXX
-// RUN: %clang -target x86_64-apple-darwin -mmacosx-version-min=10.9 %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-LIBCXX
-// RUN: %clang -target x86_64-apple-darwin -arch armv7s -miphoneos-version-min=6.1 %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-LIBSTDCXX
-// RUN: %clang -target x86_64-apple-darwin -arch armv7s -miphoneos-version-min=7.0 %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-LIBCXX
-// RUN: %clang -target x86_64-apple-darwin -arch armv7k %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-LIBCXX
-
-// The purpose of this test is that the libc++ headers should be found
-// properly. At the moment this is done by passing -stdlib=libc++ down to the
-// cc1 invocation. If and when we change to finding them in the driver this test
-// should reflect that.
-
-// CHECK-LIBCXX: -stdlib=libc++
-
-// CHECK-LIBSTDCXX-NOT: -stdlib=libc++
-// CHECK-LIBSTDCXX-NOT: -stdlib=libstdc++

Modified: cfe/trunk/lib/Driver/ToolChains.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/ToolChains.cpp?rev=260898&r1=260897&r2=260898&view=diff
==============================================================================
--- cfe/trunk/lib/Driver/ToolChains.cpp (original)
+++ cfe/trunk/lib/Driver/ToolChains.cpp Mon Feb 15 10:38:10 2016
@@ -1060,7 +1060,7 @@ DerivedArgList *Darwin::TranslateArgs(co
   }
 
   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++");
 

Copied: cfe/trunk/test/Driver/darwin-stdlib.cpp (from r260882, cfe/trunk/darwin-stdlib.cpp)
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/darwin-stdlib.cpp?p2=cfe/trunk/test/Driver/darwin-stdlib.cpp&p1=cfe/trunk/darwin-stdlib.cpp&r1=260882&r2=260898&rev=260898&view=diff
==============================================================================
    (empty)




More information about the cfe-commits mailing list