Page MenuHomePhabricator

[libc++abi] Make libunwind static linking possible in standalone builds
Needs ReviewPublic

Authored by tambre on Apr 2 2020, 5:22 AM.

Details

Reviewers
ldionne
Group Reviewers
Restricted Project
Summary

This is the same way that libc++abi static linking is handled in libc++.

Resolves PR45348.

Diff Detail

Event Timeline

tambre created this revision.Apr 2 2020, 5:22 AM
Herald added a project: Restricted Project. · View Herald TranscriptApr 2 2020, 5:22 AM
Herald added a reviewer: Restricted Project. · View Herald Transcript

I think that @ldionne should chime in on this change. Mechanically, sure, I don't see any problems with the change.

ldionne: ping

ldionne requested changes to this revision.Apr 7 2020, 5:36 AM
ldionne added inline comments.
libcxxabi/src/CMakeLists.txt
263

Where is LIBCXXABI_UNWIND_LIBRARY_PATH defined? I can't find that CMake option anywhere.

This revision now requires changes to proceed.Apr 7 2020, 5:36 AM
tambre updated this revision to Diff 255674.Apr 7 2020, 7:27 AM
tambre marked 2 inline comments as done.

Add cache variable for LIBCXXABI_UNWIND_LIBRARY_PATH to improve discoverability and clarify usage.

tambre added inline comments.Apr 7 2020, 7:29 AM
libcxxabi/src/CMakeLists.txt
263

This is for the user to define if they want to. Same way as LIBCXX_CXX_ABI_LIBRARY_PATH. I've added a cache variable for this in the main file to make it easier to discover.

Could you please chime in on http://lists.llvm.org/pipermail/libcxx-dev/2020-April/000793.html? I'd like to better understand why we even need to support a standalone build -- I thought we were not supporting those anymore since the monorepo.

I'll chime in on that. I just recently migrated the company I work for to LLVM, so I was only aware that building in a non-monorepo layout is unsupported now.

ldionne: Ping. Per the mailing list thread it seems reasonable to support this scenario.

tambre added a comment.May 7 2020, 1:13 AM

ldionne: ping

ldionne: ping

ldionne: ping

ldionne: ping

ldionne: ping. From what I gather, building projects separately is still supported, but I remain unaware of an option to accomplish what I want without downsides. I'd really rather not keep a single out-of-tree patch for my use.