forked from OSchip/llvm-project
[Compiler-RT] Remove dependency on libgcc_s/eh
Currently, for --rtlib=compiler-rt on GNU systems, we're assuming that one has libgcc_s and libgcc_eh as low-level libraries, which when used in conjunction with -lunwind or -lc++abi, breaks that assumption. My original fix was wrong, and this patch reverts it to prepare for a new flag to choose the unwinder/C++ libraries. For the time being, people can use "-lgcc_s -lgcc_eh" or "-lunwind -lc++abi" or any combination they need explicitly. llvm-svn: 243025
This commit is contained in:
parent
338b42c329
commit
830f0c4c46
|
@ -2293,13 +2293,6 @@ SmallString<128> tools::getCompilerRT(const ToolChain &TC, StringRef Component,
|
|||
static void addClangRT(const ToolChain &TC, const ArgList &Args,
|
||||
ArgStringList &CmdArgs) {
|
||||
CmdArgs.push_back(Args.MakeArgString(getCompilerRT(TC, "builtins")));
|
||||
|
||||
if (!TC.getTriple().isOSWindows()) {
|
||||
// FIXME: why do we link against gcc when we are using compiler-rt?
|
||||
CmdArgs.push_back("-lgcc_s");
|
||||
if (TC.getDriver().CCCIsCXX())
|
||||
CmdArgs.push_back("-lgcc_eh");
|
||||
}
|
||||
}
|
||||
|
||||
static void addProfileRT(const ToolChain &TC, const ArgList &Args,
|
||||
|
|
|
@ -66,9 +66,9 @@
|
|||
// CHECK-LD-RT: "-L[[SYSROOT]]/usr/lib/gcc/x86_64-unknown-linux/4.6.0/../../.."
|
||||
// CHECK-LD-RT: "-L[[SYSROOT]]/lib"
|
||||
// CHECK-LD-RT: "-L[[SYSROOT]]/usr/lib"
|
||||
// CHECK-LD-RT: libclang_rt.builtins-x86_64.a" "-lgcc_s"
|
||||
// CHECK-LD-RT: libclang_rt.builtins-x86_64.a"
|
||||
// CHECK-LD-RT: "-lc"
|
||||
// CHECK-LD-RT: libclang_rt.builtins-x86_64.a" "-lgcc_s"
|
||||
// CHECK-LD-RT: libclang_rt.builtins-x86_64.a"
|
||||
//
|
||||
// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
|
||||
// RUN: --target=arm-linux-androideabi \
|
||||
|
@ -81,9 +81,9 @@
|
|||
// CHECK-LD-RT-ANDROID: "--eh-frame-hdr"
|
||||
// CHECK-LD-RT-ANDROID: "-m" "armelf_linux_eabi"
|
||||
// CHECK-LD-RT-ANDROID: "-dynamic-linker"
|
||||
// CHECK-LD-RT-ANDROID: libclang_rt.builtins-arm-android.a" "-lgcc_s"
|
||||
// CHECK-LD-RT-ANDROID: libclang_rt.builtins-arm-android.a"
|
||||
// CHECK-LD-RT-ANDROID: "-lc"
|
||||
// CHECK-LD-RT-ANDROID: libclang_rt.builtins-arm-android.a" "-lgcc_s"
|
||||
// CHECK-LD-RT-ANDROID: libclang_rt.builtins-arm-android.a"
|
||||
//
|
||||
// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
|
||||
// RUN: --target=x86_64-unknown-linux \
|
||||
|
|
Loading…
Reference in New Issue