[llvm] [cmake] Pass PYTHON_EXECUTABLE to native builds (PR #163574)
Ross Burton via llvm-commits
llvm-commits at lists.llvm.org
Tue Nov 4 08:56:57 PST 2025
https://github.com/rossburton updated https://github.com/llvm/llvm-project/pull/163574
>From 74d12bfc7e962f1b425bd4d4395384f257f1026f Mon Sep 17 00:00:00 2001
From: Ross Burton <ross.burton at arm.com>
Date: Wed, 15 Oct 2025 15:21:16 +0100
Subject: [PATCH] [cmake] Pass PYTHON_EXECUTABLE to native builds
Ensure that the nested native build uses the same python interpreter as
the main build, in case the python that CMake detects first is not the
python that the user has specified explicitly.
Original fix by Anuj Mittal <anuj.mittal at intel.com>.
---
llvm/cmake/modules/CrossCompile.cmake | 1 +
1 file changed, 1 insertion(+)
diff --git a/llvm/cmake/modules/CrossCompile.cmake b/llvm/cmake/modules/CrossCompile.cmake
index bfbd9cfd4063f..2a69c5133c56f 100644
--- a/llvm/cmake/modules/CrossCompile.cmake
+++ b/llvm/cmake/modules/CrossCompile.cmake
@@ -101,6 +101,7 @@ function(llvm_create_cross_target project_name target_name toolchain buildtype)
-DLLVM_INCLUDE_BENCHMARKS=OFF
-DLLVM_INCLUDE_TESTS=OFF
-DLLVM_TABLEGEN_FLAGS="${LLVM_TABLEGEN_FLAGS}"
+ -DPYTHON_EXECUTABLE="${PYTHON_EXECUTABLE}"
${build_type_flags} ${linker_flag} ${external_clang_dir} ${libc_flags}
${ARGN}
WORKING_DIRECTORY ${${project_name}_${target_name}_BUILD}
More information about the llvm-commits
mailing list