@@ -163,6 +163,11 @@ set common_cmake_flags=^
163163 -DLLVM_ENABLE_PROJECTS=" clang;clang-tools-extra;lld" ^
164164 -DLLVM_ENABLE_RUNTIMES=" compiler-rt;openmp"
165165
166+ set common_lldb_flags = ^
167+ -DLLDB_RELOCATABLE_PYTHON=1 ^
168+ -DLLDB_EMBED_PYTHON_HOME=OFF ^
169+ -DLLDB_ENABLE_LIBXML2=OFF
170+
166171set cmake_profile_flags = " "
167172
168173REM Preserve original path
@@ -209,6 +214,7 @@ set all_cmake_flags=^
209214 %cmake_flags% ^
210215 -DLLVM_ENABLE_PROJECTS=" clang;clang-tools-extra;lld;lldb;" ^
211216 %common_lldb_flags% ^
217+ -DPYTHON_HOME=%PYTHONHOME% ^
212218 -DCMAKE_C_COMPILER=%stage0_bin_dir% /clang-cl.exe ^
213219 -DCMAKE_CXX_COMPILER=%stage0_bin_dir% /clang-cl.exe ^
214220 -DCMAKE_LINKER=%stage0_bin_dir% /lld-link.exe ^
@@ -261,7 +267,7 @@ if "%arch%"=="arm64" (
261267cmake -GNinja %cmake_flags% ^
262268 -DLLVM_TARGETS_TO_BUILD=Native ^
263269 %llvm_src% \llvm || exit /b 1
264- ninja || exit /b 1
270+ ninja || ninja || ninja || exit /b 1
265271ninja check-llvm || exit /b 1
266272ninja check-clang || exit /b 1
267273ninja check-lld || exit /b 1
@@ -288,16 +294,10 @@ set cmake_flags=%all_cmake_flags:\=/%
288294mkdir build_%arch%
289295cd build_%arch%
290296call :do_generate_profile || exit /b 1
291-
292- set common_lldb_flags = ^
293- -DLLDB_RELOCATABLE_PYTHON=1 ^
294- -DLLDB_EMBED_PYTHON_HOME=OFF ^
295- -DLLDB_ENABLE_LIBXML2=OFF ^
296- -DPYTHON_HOME=%PYTHONHOME%
297-
298297cmake -GNinja %cmake_flags% ^
299298 -DLLVM_ENABLE_PROJECTS=" clang;clang-tools-extra;lld;lldb;flang;mlir" ^
300299 %common_lldb_flags% ^
300+ -DPYTHON_HOME=%PYTHONHOME% ^
301301 %cmake_profile_flags% %llvm_src% \llvm || exit /b 1
302302ninja || ninja || ninja || exit /b 1
303303ninja check-llvm || exit /b 1
0 commit comments