This is an archive of the discontinued LLVM Phabricator instance.

[libcxxabi] Automatically use static libunwind when required
ClosedPublic

Authored by smeenai on Aug 24 2023, 4:02 PM.

Details

Reviewers
phosek
Group Reviewers
Restricted Project
Commits
rG3789c236bbda: [libcxxabi] Automatically use static libunwind when required
Summary

If we attempt to use unwind_shared when LIBUNWIND_ENABLE_SHARED is OFF,
we'll get link errors. LIBCXXABI_STATICALLY_LINK_UNWINDER_IN_SHARED_LIBRARY
avoids that, but it seems redundant to have to specify it manually.
Automatically switch libunwind statically when its shared build is
disabled, which also matches compiler-rt [1].

[1] https://github.com/llvm/llvm-project/blob/71bfec762bd970e7834f58c158ddc15f93402d7a/compiler-rt/CMakeLists.txt#L238-L240

Diff Detail

Event Timeline

smeenai created this revision.Aug 24 2023, 4:02 PM
Herald added a project: Restricted Project. · View Herald TranscriptAug 24 2023, 4:02 PM
smeenai requested review of this revision.Aug 24 2023, 4:02 PM
Herald added a project: Restricted Project. · View Herald TranscriptAug 24 2023, 4:02 PM
Herald added a reviewer: Restricted Project. · View Herald Transcript
phosek accepted this revision.Aug 24 2023, 7:34 PM

LGTM

This revision is now accepted and ready to land.Aug 24 2023, 7:34 PM