[compiler-rt] [compiler-rt][cmake] Add option to control shared library builds (PR #139042)
Yuta Saito via llvm-commits
llvm-commits at lists.llvm.org
Mon Jun 16 18:49:16 PDT 2025
================
@@ -91,6 +91,13 @@ mark_as_advanced(COMPILER_RT_SCUDO_STANDALONE_BUILD_SHARED)
option(COMPILER_RT_BUILD_SCUDO_STANDALONE_WITH_LLVM_LIBC "Build SCUDO standalone with LLVM's libc headers" OFF)
mark_as_advanced(COMPILER_RT_BUILD_SCUDO_STANDALONE_WITH_LLVM_LIBC)
+set(COMPILER_RT_BUILD_SHARED_LIBS_DEFAULT ON)
+if(CMAKE_SYSTEM_NAME STREQUAL "WASI")
+ set(COMPILER_RT_BUILD_SHARED_LIBS_DEFAULT OFF)
+endif()
----------------
kateinoigakukun wrote:
Hmm, according to the CI failure, it seems like compiler-rt for the host platform is configured at the same CMake unit of the host compiler, so `BUILD_SHARED_LIBS` is shared for compiler and runtime libs for the host platform.
I think it's better to have a separate CMake variable to make things simpler.
https://github.com/llvm/llvm-project/pull/139042
More information about the llvm-commits
mailing list