[libcxx-commits] [PATCH] D145716: [CMake] Unify llvm_check_linker_flag and llvm_check_compiler_linker_flag

Martin Storsjö via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Tue Mar 28 02:17:14 PDT 2023


mstorsjo added a comment.

Thanks for the revert - I was also just looking into a build issue that seems to be caused by this commit.



================
Comment at: runtimes/CMakeLists.txt:144
+# TODO: Switch to check_linker_flag after raise the minimum CMake version past 3.14.
+check_cxx_compiler_flag(-nostdlib++ CXX_SUPPORTS_NOSTDLIBXX_FLAG)
 if (CXX_SUPPORTS_NOSTDLIBXX_FLAG)
----------------
I believe that this is what caused the failures for me; `check_cxx_compiler_flag` only passes the flag to compilation, not to linking. If the C++ library isn't available yet, this will fail, since it's essential that `-nostdlib++` gets passed to the linking command (too).


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D145716



More information about the libcxx-commits mailing list