[PATCH] D70416: [Driver] Make -static-libgcc imply static libunwind

Sterling Augustine via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Apr 23 16:52:38 PDT 2020


saugustine added inline comments.


================
Comment at: clang/lib/Driver/ToolChains/CommonArgs.cpp:1215
+    else
+      CmdArgs.push_back("-l:libunwind.so");
     break;
----------------
itollefsen wrote:
> If you are building with `-DLIBUNWIND_ENABLE_SHARED:OFF -DLIBUNWIND_ENABLE_STATIC:ON`, there's no shared version available. And vice versa. This doesn't account for that.
Although true, I don't believe this is any different from the parallel libgcc situation. libgcc_eh is the static version, and will never be satisfied by the dynamic version. libgcc_s is the dynamic version, and can never satisfy the static version. See lines 1204-1208 above.

The case where you ask for a static compiler-rt but still want a dynamic unwind library is new. I'm not opposed to supporting it, but "what gcc does" isn't a terrible standard.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D70416/new/

https://reviews.llvm.org/D70416





More information about the cfe-commits mailing list