[libcxx-commits] [PATCH] D113253: [runtimes] Fix building initial libunwind+libcxxabi+libcxx with compiler implied -lunwind

Martin Storsjö via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Fri Nov 5 02:59:12 PDT 2021


mstorsjo created this revision.
mstorsjo added reviewers: phosek, hvdijk.
Herald added a subscriber: mgorny.
mstorsjo requested review of this revision.
Herald added projects: libc++, libc++abi.
Herald added a reviewer: libc++.
Herald added a reviewer: libc++abi.

This does mostly the same as D112126 <https://reviews.llvm.org/D112126>, but for the runtimes cmake files.
Most of that is straightforward, but the interdependency between
libcxx and libunwind is tricky:

Libunwind is built at the same time as libcxx, but libunwind is not
installed yet. LIBCXXABI_USE_LLVM_UNWINDER makes libcxx link directly
against the just-built libunwind, but the compiler implicit -lunwind
isn't found. This patch avoids that by adding --unwindlib=none if
supported, if we are going to link explicitly against a newly built
unwinder anyway.

(There might be a similar interdependency between libcxxabi and
libunwind too - it doesn't show up in my builds targeting Windows,
as libcxxabi is always built statically though. @hvdijk, can you test
using the new build layout by targeting cmake at llvm-project/runtimes
instead of building libunwind/libcxxabi/libcxx individually in your
environment and see how it behaves?)

This is a mutually exclusive alternative to D113252 <https://reviews.llvm.org/D113252>.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D113253

Files:
  libcxx/CMakeLists.txt
  libcxx/cmake/config-ix.cmake
  runtimes/CMakeLists.txt

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D113253.385002.patch
Type: text/x-patch
Size: 4654 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20211105/7c5c4a01/attachment-0001.bin>


More information about the libcxx-commits mailing list