Add an explicit LIBCXX_CXX_ABI=system-libcxxabi option for linking to
system-installed libc++abi. This fixes the ability to link against one
when building libcxx via the runtimes build, as otherwise the build
system insists on linking into in-tree targets.
Details
- Reviewers
ldionne EricWF phosek mstorsjo - Group Reviewers
Restricted Project - Commits
- rGba4f1e44e480: [libcxx] Add an explicit option to build against system-libcxxabi
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
libcxx/cmake/Modules/HandleLibCXXABI.cmake | ||
---|---|---|
113 | I think this doesn't work because cxxabi_shared and cxxabi_static might not be known by the time we get here. What is the behavior you'd like to see here? Are you attempting to link against the system libc++abi.so? |
libcxx/cmake/Modules/HandleLibCXXABI.cmake | ||
---|---|---|
113 | Yes, exactly that. |
libcxx/cmake/Modules/HandleLibCXXABI.cmake | ||
---|---|---|
113 | I think what we want instead is to have another choice for the ABI library, something like system-libcxxabi. When that ABI library is selected, we'd add -lc++abi and the right include path. |
libcxx/cmake/Modules/HandleLibCXXABI.cmake | ||
---|---|---|
113 | Ok, I'll update the patch in a few hours. |
Ping. I'd like to try to backport the fixes to 14.x, so would be nice to get it sorted out before it goes out.
Sorry, I went OOO. I've actually been working on a more holistic refactoring of this, but I think this patch is fine as a first step. I'll get my refactoring out soon.
My proposed change is up as https://reviews.llvm.org/D120727.
Let's land this one and cherry-pick to release/14.x. Then, I can rebase my D120727 on it.
Could you push it for me, please? My PC died yesterday and I won't have it fixed in the next few days.
I think this doesn't work because cxxabi_shared and cxxabi_static might not be known by the time we get here. What is the behavior you'd like to see here? Are you attempting to link against the system libc++abi.so?