https://github.com/jroelofs created https://github.com/llvm/llvm-project/pull/225970
Since we're already passing the -DCMAKE_GENERATOR through, we need the corresponding CMAKE_MAKE_PROGRAM, which CMake doesn't always know how to find itself. rdar://187916126 >From 68ffc1a4e82a02720fc4ff66e82441766284c1b2 Mon Sep 17 00:00:00 2001 From: Jon Roelofs <[email protected]> Date: Wed, 23 Sep 2026 16:05:14 -0700 Subject: [PATCH] [CMake] Pass through -DCMAKE_MAKE_PROGRAM= when generating profdata for clang Since we're already passing the -DCMAKE_GENERATOR through, we need the corresponding CMAKE_MAKE_PROGRAM, which CMake doesn't always know how to find itself. rdar://187916126 --- clang/utils/perf-training/bolt.lit.cfg | 1 + clang/utils/perf-training/bolt.lit.site.cfg.in | 1 + clang/utils/perf-training/lit.cfg | 1 + clang/utils/perf-training/lit.site.cfg.in | 1 + clang/utils/perf-training/llvm-support/build.test | 2 +- 5 files changed, 5 insertions(+), 1 deletion(-) diff --git a/clang/utils/perf-training/bolt.lit.cfg b/clang/utils/perf-training/bolt.lit.cfg index b639597e222b2..0328a9b09a436 100644 --- a/clang/utils/perf-training/bolt.lit.cfg +++ b/clang/utils/perf-training/bolt.lit.cfg @@ -55,6 +55,7 @@ config.substitutions.append(("%clang", config.clang)) config.substitutions.append(("%test_root", config.test_exec_root)) config.substitutions.append(("%cmake_compiler_args", config.cmake_compiler_args)) config.substitutions.append(('%cmake_generator', config.cmake_generator)) +config.substitutions.append(('%cmake_make_program', config.cmake_make_program)) config.substitutions.append(('%cmake', config.cmake_exe)) config.substitutions.append(('%llvm_src_dir', config.llvm_src_dir)) config.substitutions.append(('%perf_wrapper', perf_wrapper)) diff --git a/clang/utils/perf-training/bolt.lit.site.cfg.in b/clang/utils/perf-training/bolt.lit.site.cfg.in index 3de5026e4792a..f9a8d065d135a 100644 --- a/clang/utils/perf-training/bolt.lit.site.cfg.in +++ b/clang/utils/perf-training/bolt.lit.site.cfg.in @@ -14,6 +14,7 @@ config.clang_bolt_name = "@CLANG_BOLT_INSTRUMENTED@" config.cmake_exe = "@CMAKE_COMMAND@" config.llvm_src_dir ="@CMAKE_SOURCE_DIR@" config.cmake_generator ="@CMAKE_GENERATOR@" +config.cmake_make_program ="@CMAKE_MAKE_PROGRAM@" # Let the main config do the real work. lit_config.load_config(config, "@CLANG_SOURCE_DIR@/utils/perf-training/bolt.lit.cfg") diff --git a/clang/utils/perf-training/lit.cfg b/clang/utils/perf-training/lit.cfg index 7b20922a63a3d..3fea58b45e359 100644 --- a/clang/utils/perf-training/lit.cfg +++ b/clang/utils/perf-training/lit.cfg @@ -43,6 +43,7 @@ config.substitutions.append( ('%clang', '%s %s ' % (config.clang, sysroot_flags) config.substitutions.append( ('%test_root', config.test_exec_root ) ) config.substitutions.append( ('%cmake_compiler_args', config.cmake_compiler_args)) config.substitutions.append( ('%cmake_generator', config.cmake_generator ) ) +config.substitutions.append( ('%cmake_make_program', config.cmake_make_program ) ) config.substitutions.append( ('%cmake', config.cmake_exe ) ) config.substitutions.append( ('%llvm_src_dir', config.llvm_src_dir ) ) config.substitutions.append( ('%perf_wrapper', '' ) ) diff --git a/clang/utils/perf-training/lit.site.cfg.in b/clang/utils/perf-training/lit.site.cfg.in index 43579b027d482..ae43a39b7706a 100644 --- a/clang/utils/perf-training/lit.site.cfg.in +++ b/clang/utils/perf-training/lit.site.cfg.in @@ -11,6 +11,7 @@ config.python_exe = "@Python3_EXECUTABLE@" config.cmake_exe = "@CMAKE_COMMAND@" config.llvm_src_dir = "@LLVM_MAIN_SRC_DIR@" config.cmake_generator ="@CMAKE_GENERATOR@" +config.cmake_make_program ="@CMAKE_MAKE_PROGRAM@" config.use_llvm_build = @CLANG_PGO_TRAINING_USE_LLVM_BUILD@ # Let the main config do the real work. diff --git a/clang/utils/perf-training/llvm-support/build.test b/clang/utils/perf-training/llvm-support/build.test index 32ce9a870b91d..067e331311ebd 100644 --- a/clang/utils/perf-training/llvm-support/build.test +++ b/clang/utils/perf-training/llvm-support/build.test @@ -1,2 +1,2 @@ -RUN: %cmake -G %cmake_generator -B %t -S %llvm_src_dir %cmake_compiler_args -DCMAKE_BUILD_TYPE=Release +RUN: %cmake -G %cmake_generator -DCMAKE_MAKE_PROGRAM=%cmake_make_program -B %t -S %llvm_src_dir %cmake_compiler_args -DCMAKE_BUILD_TYPE=Release RUN: %perf_wrapper %cmake --build %t -v --target LLVMSupport _______________________________________________ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
