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

Louis Dionne via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Tue Nov 16 06:34:45 PST 2021


ldionne accepted this revision.
ldionne added a comment.
This revision is now accepted and ready to land.

LGTM but I have a question for my understanding.

In D113253#3112528 <https://reviews.llvm.org/D113253#3112528>, @phosek wrote:

> I think we should ideally go over all the LLVM options that are used in runtimes and split those into a separate top-level CMake module and then stop including both `AddLLVM.cmake` and `HandleLLVMOptions.cmake` from the runtimes build.

This x 1000.



================
Comment at: runtimes/CMakeLists.txt:101-102
+
+check_c_compiler_flag("" LLVM_RUNTIMES_LINKING_WORKS)
+if (NOT LLVM_RUNTIMES_LINKING_WORKS)
+  # The compiler driver may be implicitly trying to link against libunwind, which
----------------
I don't understand how this check works. Since you are disabling runtime linking, I would think that `check_c_compiler_flag` succeeding does NOT imply that runtime linking works?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D113253/new/

https://reviews.llvm.org/D113253



More information about the libcxx-commits mailing list