@@ -165,12 +165,6 @@ set common_cmake_flags=^
165165 -DLLVM_ENABLE_PROJECTS=" clang;clang-tools-extra;lld" ^
166166 -DLLVM_ENABLE_RUNTIMES=" compiler-rt;openmp"
167167
168- set common_lldb_flags = ^
169- -DLLDB_RELOCATABLE_PYTHON=1 ^
170- -DLLDB_EMBED_PYTHON_HOME=OFF ^
171- -DLLDB_ENABLE_LIBXML2=OFF ^
172- -DPYTHON_HOME=%PYTHONHOME%
173-
174168if " %force-msvc% " == " " (
175169 where /q clang-cl
176170 if %errorlevel% EQU 0 (
@@ -189,6 +183,12 @@ if "%force-msvc%" == "" (
189183 )
190184)
191185
186+ set common_lldb_flags = ^
187+ -DLLDB_RELOCATABLE_PYTHON=1 ^
188+ -DLLDB_EMBED_PYTHON_HOME=OFF ^
189+ -DLLDB_ENABLE_LIBXML2=OFF ^
190+ -DPYTHON_HOME=%PYTHONHOME%
191+
192192set cmake_profile_flags = " "
193193
194194REM Preserve original path
@@ -264,14 +264,8 @@ exit /b 0
264264set arch = %1
265265set python_dir = %2
266266
267- if " %arch% " == " amd64" (
268- set vs_arch = -arch=amd64
269- ) else (
270- set vs_arch = -arch=arm64
271- )
272-
273267call :set_environment %python_dir% || exit /b 1
274- call " %vsdevcmd% " %vs_arch % || exit /b 1
268+ call " %vsdevcmd% " -arch= %arch % || exit /b 1
275269@ echo on
276270mkdir build_%arch% _stage0
277271cd build_%arch% _stage0
@@ -292,8 +286,6 @@ if "%arch%"=="arm64" (
292286
293287cmake -GNinja %cmake_flags% ^
294288 -DLLVM_TARGETS_TO_BUILD=Native ^
295- -DCMAKE_C_COMPILER=clang-cl.exe ^
296- -DCMAKE_CXX_COMPILER=clang-cl.exe ^
297289 %llvm_src% \llvm || exit /b 1
298290ninja || exit /b 1
299291ninja check-llvm || exit /b 1
@@ -322,11 +314,18 @@ set cmake_flags=%all_cmake_flags:\=/%
322314mkdir build_%arch%
323315cd build_%arch%
324316call :do_generate_profile || exit /b 1
317+
318+ set common_lldb_flags = ^
319+ -DLLDB_RELOCATABLE_PYTHON=1 ^
320+ -DLLDB_EMBED_PYTHON_HOME=OFF ^
321+ -DLLDB_ENABLE_LIBXML2=OFF ^
322+ -DPYTHON_HOME=%PYTHONHOME%
323+
325324cmake -GNinja %cmake_flags% ^
326325 -DLLVM_ENABLE_PROJECTS=" clang;clang-tools-extra;lld;lldb;flang;mlir" ^
327326 %common_lldb_flags% ^
328327 %cmake_profile_flags% %llvm_src% \llvm || exit /b 1
329- ninja || exit /b 1
328+ ninja || ninja || ninja || exit /b 1
330329ninja check-llvm || exit /b 1
331330ninja check-clang || exit /b 1
332331ninja check-lld || exit /b 1
0 commit comments