This is an archive of the discontinued LLVM Phabricator instance.

[libcxx] Add a dependency on unwind in cxx_static, if LIBCXXABI_USE_LLVM_UNWINDER is set
ClosedPublic

Authored by mstorsjo on Nov 9 2021, 12:22 AM.

Details

Reviewers
ldionne
Group Reviewers
Restricted Project
Commits
rGb1c9d3d29a1e: [libcxx] Add a dependency on unwind in cxx_static, if…
Summary

Even if building cxx_static in itself doesn't actually link in the
requested unwinder, add a synthetic dependency so that building
cxx_static makes sure that the unwinder that was requested to be used
also gets built.

Diff Detail

Event Timeline

mstorsjo created this revision.Nov 9 2021, 12:22 AM
mstorsjo requested review of this revision.Nov 9 2021, 12:22 AM
Herald added a project: Restricted Project. · View Herald TranscriptNov 9 2021, 12:22 AM
Herald added a reviewer: Restricted Project. · View Herald Transcript
ldionne requested changes to this revision.Nov 9 2021, 5:24 AM
ldionne added inline comments.
libcxx/src/CMakeLists.txt
289–294

Should we put that dependency on check-cxx instead? We could add it to cxx-test-depends.

This revision now requires changes to proceed.Nov 9 2021, 5:24 AM
mstorsjo requested review of this revision.Nov 9 2021, 5:28 AM
mstorsjo added inline comments.
libcxx/src/CMakeLists.txt
289–294

That was my first idea, but in some sense, this felt more natural and symmetrical to adding the unwind dependency to cxx_shared right above here - so you get libunwind built if you have LIBCXXABI_USE_LLVM_UNWINDER set, when you do ninja cxx, even if you've only set up a static libcxx.

But I don't feel strongly, I can post that version of the patch as well.

ldionne accepted this revision.Nov 9 2021, 7:17 AM
ldionne added inline comments.
libcxx/src/CMakeLists.txt
289–294

Ok, I guess I am swayed by the symmetry argument with cxx_shared. Thanks for taking the time to explain. Let's go with this one and close D113481.

This revision is now accepted and ready to land.Nov 9 2021, 7:17 AM
This revision was automatically updated to reflect the committed changes.