Skip to content
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

build: build addons in parallel on Windows #21403

Closed
wants to merge 1 commit into from
Closed
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
12 changes: 5 additions & 7 deletions vcbuild.bat
Original file line number Diff line number Diff line change
Expand Up @@ -448,13 +448,11 @@ for /d %%F in (test\addons\??_*) do (
"%node_exe%" tools\doc\addon-verify.js
if %errorlevel% neq 0 exit /b %errorlevel%
:: building addons
setlocal EnableDelayedExpansion
for /d %%F in (test\addons\*) do (
%node_gyp_exe% rebuild ^
--directory="%%F" ^
--nodedir="%cd%"
if !errorlevel! neq 0 exit /b !errorlevel!
)
setlocal
set npm_config_nodedir=%~dp0
"%node_exe%" "%~dp0tools\build-addons.js" "%~dp0deps\npm\node_modules\node-gyp\bin\node-gyp.js" "%~dp0test\addons"
if errorlevel 1 exit /b 1
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be a neq 0 test like the code block it replaces?

Copy link
Contributor

@refack refack Jun 21, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is more CMD idiomatic (https://ss64.com/nt/if.html): if errorlevel NUM checks if %errorlevel% if equal or greater then NUM (notice errorlevel is not dereferenced with % or !!)

But AFAIK the last 1 is unnecessary (exit /b will propagate the errorlevel). https://ss64.com/nt/exit.html

EXIT without an ExitCode acts the same as goto:eof and will not alter the %ERRORLEVEL%

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can errorlevel be negative?

endlocal

:build-addons-napi
if not defined build_addons_napi goto run-tests
Expand Down