[PATCH] D96070: [clang] [driver] Enable static linking to libc++
Timm Bäder via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Feb 9 09:24:44 PST 2021
tbaeder added a comment.
In D96070#2546330 <https://reviews.llvm.org/D96070#2546330>, @MaskRay wrote:
> we cannot control `(optional -lc++abi/-lcxxrt/others)`, which is depended by the installation configuration (e.g. LIBCXX_STATICALLY_LINK_ABI_IN_STATIC_LIBRARY, or libc++.a as a linker script (https://bugs.llvm.org/show_bug.cgi?id=46321), or .deplibs) and whether you are specifying --sysroot. Perhaps I had the opportunity to redesign the matter, I would let `-stdlib=libc++` not affect linker options at all. Users just should specify `-lc++` and related options by themselves.
Right, but at least some of these sound like the can or should be solved in libc++ then. Reading https://reviews.llvm.org/D60794, I thought this was not going to happen and the solution should instead be in clang.
What is the ideal solution here? If `-static -stdlib=libc++` is not meant to work, is the working solution documented anywhere that we could link people to? If your blog post isn't official of course :)
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D96070/new/
https://reviews.llvm.org/D96070
More information about the cfe-commits
mailing list