[llvm] Remember LLVM_ENABLE_LIBCXX setting in installed configuration (PR #139712)
David Truby via llvm-commits
llvm-commits at lists.llvm.org
Tue May 13 08:53:49 PDT 2025
================
@@ -19,7 +20,11 @@ if(NOT DEFINED LLVM_STDLIB_HANDLED)
if(LLVM_COMPILER_IS_GCC_COMPATIBLE)
check_cxx_compiler_flag("-stdlib=libc++" CXX_COMPILER_SUPPORTS_STDLIB)
check_linker_flag(CXX "-stdlib=libc++" CXX_LINKER_SUPPORTS_STDLIB)
- if(CXX_COMPILER_SUPPORTS_STDLIB AND CXX_LINKER_SUPPORTS_STDLIB)
+ cmake_push_check_state()
+ set(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} -stdlib=libc++")
----------------
DavidTruby wrote:
Just saw your updated PR; I think we _do_ need to still inherit CMAKE_REQUIRED_FLAGS, for cases where the path to the c++ lib is being added as a flag etc. We just need to specifically remove `-nostdinc++`.
https://github.com/llvm/llvm-project/pull/139712
More information about the llvm-commits
mailing list