Skip to content

Commit 785e7f0

Browse files
authored
Remember LLVM_ENABLE_LIBCXX setting in installed configuration (#134990)
The buidbot [flang-aarch64-libcxx](https://lab.llvm.org/buildbot/#/builders/89) is currently failing with an ABI issue. The suspected reason is that LLVMSupport.a is built using libc++, but the unittests are using the default C++ standard library, libstdc++ in this case. This predefined `llvm_gtest` target uses the LLVMSupport from `find_package(LLVM)`, which finds the libc++-built LLVMSupport. To fix, store the `LLVM_ENABLE_LIBCXX` setting in the LLVMConfig.cmake such that everything that links to LLVM libraries use the same standard library. In this case discussed in llvm/llvm-zorg#387 it was the flang-rt unittests, but other runtimes with GTest unittests should have the same issue (e.g. offload), and any external project that uses `find_package(LLVM)`.
1 parent 5543d9d commit 785e7f0

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

llvm/cmake/modules/LLVMConfig.cmake.in

+2
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,8 @@ endif()
5555

5656
set(LLVM_ENABLE_RTTI @LLVM_ENABLE_RTTI@)
5757

58+
set(LLVM_ENABLE_LIBCXX @LLVM_ENABLE_LIBCXX@)
59+
5860
set(LLVM_ENABLE_LIBEDIT @HAVE_LIBEDIT@)
5961
if(LLVM_ENABLE_LIBEDIT)
6062
find_package(LibEdit)

0 commit comments

Comments
 (0)