[libcxx-commits] [PATCH] D113467: [libcxx] Add a dependency on unwind in cxx_static, if LIBCXXABI_USE_LLVM_UNWINDER is set
Martin Storsjö via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Tue Nov 9 00:22:40 PST 2021
mstorsjo created this revision.
mstorsjo added a reviewer: ldionne.
Herald added a subscriber: mgorny.
mstorsjo requested review of this revision.
Herald added a project: libc++.
Herald added a reviewer: libc++.
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.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D113467
Files:
libcxx/src/CMakeLists.txt
Index: libcxx/src/CMakeLists.txt
===================================================================
--- libcxx/src/CMakeLists.txt
+++ libcxx/src/CMakeLists.txt
@@ -286,6 +286,13 @@
cxx_add_common_build_flags(cxx_static)
cxx_set_common_defines(cxx_static)
+ if (LIBCXXABI_USE_LLVM_UNWINDER)
+ # If we intend to use the just-built unwinder, add a dependency so that it
+ # gets built, even if we technically aren't going to link it in at this
+ # stage.
+ add_dependencies(cxx_static unwind)
+ endif()
+
if (LIBCXX_HERMETIC_STATIC_LIBRARY)
# If the hermetic library doesn't define the operator new/delete functions
# then its code shouldn't declare them with hidden visibility. They might
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D113467.385718.patch
Type: text/x-patch
Size: 724 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20211109/97414375/attachment.bin>
More information about the libcxx-commits
mailing list