[clang] [llvm] runtimes: Pass CMAKE_SYSTEM_NAME based on target triple (PR #203504)
Matt Arsenault via cfe-commits
cfe-commits at lists.llvm.org
Fri Jun 12 04:48:41 PDT 2026
================
@@ -376,6 +383,22 @@ function(llvm_ExternalProject_Add name source_dir)
list(APPEND compiler_args -DCMAKE_CXX_COMPILER_TARGET=${ARG_TARGET_TRIPLE})
list(APPEND compiler_args -DCMAKE_Fortran_COMPILER_TARGET=${ARG_TARGET_TRIPLE})
list(APPEND compiler_args -DCMAKE_ASM_COMPILER_TARGET=${ARG_TARGET_TRIPLE})
+
+ # Pass CMAKE_SYSTEM_NAME derived from the target triple so the sub-build
+ # loads the correct platform files instead of the host's.
+ if(NOT "${_cmake_system_name}" STREQUAL "${CMAKE_HOST_SYSTEM_NAME}")
----------------
arsenm wrote:
Maybe this should just be unconditional, I guess it's not worth saving a redundant argument
https://github.com/llvm/llvm-project/pull/203504
More information about the cfe-commits
mailing list