Skip to content

build: early exit on error #69582

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 3, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions utils/build-windows-toolchain.bat
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,9 @@ echo set SKIP_UPDATE_CHECKOUT=%SKIP_UPDATE_CHECKOUT%>> %TEMP%\call-build.cmd
echo set REPO_SCHEME=%REPO_SCHEME%>> %TEMP%\call-build.cmd
echo "%~f0">> %TEMP%\call-build.cmd
start /i /b /wait cmd.exe /env=default /c "%TEMP%\call-build.cmd"
set ec=%errorlevel%
del %TEMP%\call-build.cmd
exit /b
exit /b %ec%

:Start

Expand All @@ -43,7 +44,7 @@ set BuildRoot=%SourceRoot%\build

md %BuildRoot%
subst T: /d
subst T: %BuildRoot% || (exit /b)
subst T: %BuildRoot% || (exit /b 1)
set BuildRoot=T:

:: Identify the PackageRoot
Expand All @@ -70,7 +71,7 @@ if "%TestArg:~-1%"=="," (set TestArg=%TestArg:~0,-1%) else (set TestArg= )
set SkipPackagingArg=-SkipPackaging
if not "%SKIP_PACKAGING%"=="1" set "SkipPackagingArg= "

call :CloneRepositories || (exit /b)
call :CloneRepositories || (exit /b 1)

:: We only have write access to BuildRoot, so use that as the image root.
powershell.exe -ExecutionPolicy RemoteSigned -File %~dp0build.ps1 ^
Expand All @@ -80,7 +81,7 @@ powershell.exe -ExecutionPolicy RemoteSigned -File %~dp0build.ps1 ^
-BuildType %CMAKE_BUILD_TYPE% ^
%SkipPackagingArg% ^
%TestArg% ^
-Stage %PackageRoot%
-Stage %PackageRoot% || (exit /b 1)

:: Clean up the module cache
rd /s /q %LocalAppData%\clang\ModuleCache
Expand Down