mkdir build32_stage0\r
cd build32_stage0\r
REM Work around VS2017 bug by using MinSizeRel.\r
-cmake -GNinja %cmake_flags% -DPYTHON_HOME=%python32_dir% -DCMAKE_BUILD_TYPE=MinSizeRel ..\llvm || exit /b\r
+cmake -GNinja %cmake_flags% -DPYTHON_HOME=%python32_dir% -DPYTHON_EXECUTABLE=%python32_dir%\python.exe -DCMAKE_BUILD_TYPE=MinSizeRel ..\llvm || exit /b\r
ninja all || ninja all || ninja all || exit /b\r
ninja check || ninja check || ninja check || exit /b\r
ninja check-clang || ninja check-clang || ninja check-clang || exit /b\r
cd build32\r
set CC=..\build32_stage0\bin\clang-cl\r
set CXX=..\build32_stage0\bin\clang-cl\r
-cmake -GNinja %cmake_flags% -DPYTHON_HOME=%python32_dir% ..\llvm || exit /b\r
+cmake -GNinja %cmake_flags% -DPYTHON_HOME=%python32_dir% -DPYTHON_EXECUTABLE=%python32_dir%\python.exe ..\llvm || exit /b\r
ninja all || ninja all || ninja all || exit /b\r
ninja check || ninja check || ninja check || exit /b\r
ninja check-clang || ninja check-clang || ninja check-clang || exit /b\r
cd build_vsix\r
set CC=..\build32_stage0\bin\clang-cl\r
set CXX=..\build32_stage0\bin\clang-cl\r
-cmake -GNinja %cmake_flags% -DLLVM_USE_CRT_RELEASE=MT -DBUILD_CLANG_FORMAT_VS_PLUGIN=ON -DPYTHON_HOME=%python32_dir% ..\llvm || exit /b\r
+cmake -GNinja %cmake_flags% -DLLVM_USE_CRT_RELEASE=MT -DBUILD_CLANG_FORMAT_VS_PLUGIN=ON -DPYTHON_HOME=%python32_dir% -DPYTHON_EXECUTABLE=%python32_dir%\python.exe ..\llvm || exit /b\r
ninja clang_format_vsix || exit /b\r
copy ..\llvm\tools\clang\tools\clang-format-vs\ClangFormat\bin\Release\ClangFormat.vsix ClangFormat-r%revision%.vsix\r
cd ..\r
mkdir build64_stage0\r
cd build64_stage0\r
REM Work around VS2017 bug by using MinSizeRel.\r
-cmake -GNinja %cmake_flags% -DPYTHON_HOME=%python64_dir% -DCMAKE_BUILD_TYPE=MinSizeRel ..\llvm || exit /b\r
+cmake -GNinja %cmake_flags% -DPYTHON_HOME=%python64_dir% -DPYTHON_EXECUTABLE=%python64_dir%\python.exe -DCMAKE_BUILD_TYPE=MinSizeRel ..\llvm || exit /b\r
ninja all || ninja all || ninja all || exit /b\r
ninja check || ninja check || ninja check || exit /b\r
ninja check-clang || ninja check-clang || ninja check-clang || exit /b\r
cd build64\r
set CC=..\build64_stage0\bin\clang-cl\r
set CXX=..\build64_stage0\bin\clang-cl\r
-cmake -GNinja %cmake_flags% -DPYTHON_HOME=%python64_dir% ..\llvm || exit /b\r
+cmake -GNinja %cmake_flags% -DPYTHON_HOME=%python64_dir% -DPYTHON_EXECUTABLE=%python64_dir%\python.exe ..\llvm || exit /b\r
ninja all || ninja all || ninja all || exit /b\r
ninja check || ninja check || ninja check || exit /b\r
ninja check-clang || ninja check-clang || ninja check-clang || exit /b\r