[PATCH] D98023: [clang] Don't default to a specifically shared libunwind on mingw with a g++ driver
Martin Storsjö via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Mar 5 23:10:09 PST 2021
This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rGebe6d3be0f73: [clang] Don't default to a specifically shared libunwind on mingw with a g++… (authored by mstorsjo).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D98023/new/
https://reviews.llvm.org/D98023
Files:
clang/lib/Driver/ToolChains/CommonArgs.cpp
clang/test/Driver/compiler-rt-unwind.c
Index: clang/test/Driver/compiler-rt-unwind.c
===================================================================
--- clang/test/Driver/compiler-rt-unwind.c
+++ clang/test/Driver/compiler-rt-unwind.c
@@ -69,5 +69,9 @@
// RUN: --target=x86_64-w64-mingw32 -rtlib=compiler-rt --unwindlib=libunwind \
// RUN: --gcc-toolchain="" \
// RUN: | FileCheck --check-prefix=MINGW-RTLIB-COMPILER-RT-UNWINDLIB-COMPILER-RT %s
+// RUN: %clangxx -no-canonical-prefixes %s -### -o %t.o 2>&1 \
+// RUN: --target=x86_64-w64-mingw32 -rtlib=compiler-rt --unwindlib=libunwind \
+// RUN: --gcc-toolchain="" \
+// RUN: | FileCheck --check-prefix=MINGW-RTLIB-COMPILER-RT-UNWINDLIB-COMPILER-RT %s
// MINGW-RTLIB-COMPILER-RT-UNWINDLIB-COMPILER-RT: "{{.*}}libclang_rt.builtins-x86_64.a"
// MINGW-RTLIB-COMPILER-RT-UNWINDLIB-COMPILER-RT: "{{.*}}lunwind"
Index: clang/lib/Driver/ToolChains/CommonArgs.cpp
===================================================================
--- clang/lib/Driver/ToolChains/CommonArgs.cpp
+++ clang/lib/Driver/ToolChains/CommonArgs.cpp
@@ -1382,7 +1382,9 @@
// The Android NDK only provides libunwind.a, not libunwind.so.
if (TC.getTriple().isAndroid())
return LibGccType::StaticLibGcc;
- if (D.CCCIsCXX())
+ // For MinGW, don't imply a shared libgcc here, we only want to return
+ // SharedLibGcc if that was explicitly requested.
+ if (D.CCCIsCXX() && !TC.getTriple().isOSCygMing())
return LibGccType::SharedLibGcc;
return LibGccType::UnspecifiedLibGcc;
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D98023.328740.patch
Type: text/x-patch
Size: 1506 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20210306/1a3e4bb5/attachment.bin>
More information about the cfe-commits
mailing list