[PATCH] D79995: [clang] [MinGW] Fix libunwind extension
Mateusz MikuĊa via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri May 15 11:25:14 PDT 2020
mati865 updated this revision to Diff 264292.
mati865 added a comment.
Applied review comment and formatted.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D79995/new/
https://reviews.llvm.org/D79995
Files:
clang/lib/Driver/ToolChains/CommonArgs.cpp
Index: clang/lib/Driver/ToolChains/CommonArgs.cpp
===================================================================
--- clang/lib/Driver/ToolChains/CommonArgs.cpp
+++ clang/lib/Driver/ToolChains/CommonArgs.cpp
@@ -1234,7 +1234,14 @@
case ToolChain::UNW_CompilerRT:
if (LGT == LibGccType::StaticLibGcc)
CmdArgs.push_back("-l:libunwind.a");
- else
+ else if (TC.getTriple().isOSCygMing()) {
+ if (LGT == LibGccType::SharedLibGcc)
+ CmdArgs.push_back("-l:libunwind.dll.a");
+ else
+ // Let the linker choose between libunwind.dll.a and libunwind.a
+ // depending on what's available, and depending on the -static flag
+ CmdArgs.push_back("-lunwind");
+ } else
CmdArgs.push_back("-l:libunwind.so");
break;
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D79995.264292.patch
Type: text/x-patch
Size: 783 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20200515/1c531cac/attachment.bin>
More information about the cfe-commits
mailing list