Эх сурвалжийг харах

[Driver] Only use -lc++ on Fuchsia

The fact that libc++ depends on libc++abi and libunwind is an internal
detail that's captured by the libc++.so linker script.

Differential Revision: https://reviews.llvm.org/D46768

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@332138 91177308-0d34-0410-b5e6-96231b3b80d8
Petr Hosek 7 жил өмнө
parent
commit
01b0b85e24

+ 0 - 2
lib/Driver/ToolChains/Fuchsia.cpp

@@ -267,8 +267,6 @@ void Fuchsia::AddCXXStdlibLibArgs(const ArgList &Args,
   switch (GetCXXStdlibType(Args)) {
   case ToolChain::CST_Libcxx:
     CmdArgs.push_back("-lc++");
-    CmdArgs.push_back("-lc++abi");
-    CmdArgs.push_back("-lunwind");
     break;
 
   case ToolChain::CST_Libstdcxx:

+ 2 - 2
test/Driver/fuchsia.cpp

@@ -15,7 +15,7 @@
 // CHECK-NOT: crti.o
 // CHECK-NOT: crtbegin.o
 // CHECK: "-L[[SYSROOT]]{{/|\\\\}}lib"
-// CHECK: "-lc++" "-lc++abi" "-lunwind" "-lm"
+// CHECK: "-lc++" "-lm"
 // CHECK: "{{.*[/\\]}}libclang_rt.builtins-x86_64.a"
 // CHECK: "-lc"
 // CHECK-NOT: crtend.o
@@ -28,7 +28,7 @@
 // RUN: %clangxx %s -### --target=x86_64-unknown-fuchsia -static-libstdc++ 2>&1 \
 // RUN:     | FileCheck %s -check-prefix=CHECK-STATIC
 // CHECK-STATIC-NOT: "-Bstatic"
-// CHECK-STATIC: "-lc++" "-lc++abi" "-lunwind"
+// CHECK-STATIC: "-lc++"
 // CHECK-STATIC-NOT: "-Bdynamic"
 // CHECK-STATIC: "-lm"
 // CHECK-STATIC: "-lc"