[llvm] [llvm] Fix cmake string expansion in CrossCompile.cmake (PR #138901)
David Truby via llvm-commits
llvm-commits at lists.llvm.org
Wed May 7 09:11:47 PDT 2025
================
@@ -83,9 +83,9 @@ function(llvm_create_cross_target project_name target_name toolchain buildtype)
add_custom_command(OUTPUT ${${project_name}_${target_name}_BUILD}/CMakeCache.txt
COMMAND ${CMAKE_COMMAND} -G "${CMAKE_GENERATOR}"
- -DCMAKE_MAKE_PROGRAM="${CMAKE_MAKE_PROGRAM}"
- -DCMAKE_C_COMPILER_LAUNCHER="${CMAKE_C_COMPILER_LAUNCHER}"
- -DCMAKE_CXX_COMPILER_LAUNCHER="${CMAKE_CXX_COMPILER_LAUNCHER}"
+ "-DCMAKE_MAKE_PROGRAM=${CMAKE_MAKE_PROGRAM}"
----------------
DavidTruby wrote:
I didn't have one specifically for the CMAKE_MAKE_PROGRAM, I just thought I'd fx it as well while I was here as the same reasoning would apply there.
We want this for CMAKE_C_COMPILER_LAUNCHER, where we want to add flags to `ccache` when using LLVM_CCACHE_BUILD to control certain behaviour especially when building flang. When we tried to make that change it worked on non-Windows but didn't work on Windows, this fixes at least that case. So that's the specific motivation for the change.
https://github.com/llvm/llvm-project/pull/138901
More information about the llvm-commits
mailing list