[PATCH] D96070: [clang] [driver] Enable static linking to libc++
Fangrui Song via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Feb 5 15:25:08 PST 2021
MaskRay added a comment.
The problem is that we have `-lc++ (optional -lc++abi/-lcxxrt/others) (optional -lpthread))` dependency. While we can control `-lpthread` with `-pthread` (which does extra things on its own), 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.
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