GeezerVison is showing github.com — build,win: fail fast in vcbuild without cargo · nodejs/node@84636ed
File tree
Expand file treeCollapse file tree
Open diff view settings
Expand file treeCollapse file tree
Open diff view settings
Collapse file
Copy file name to clipboard +18Lines changed: 18 additions & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
|
| 1 | +@IF NOT DEFINED DEBUG_HELPER @ECHO OFF |
| 2 | +SETLOCAL |
| 3 | + |
| 4 | +ECHO Looking for cargo |
| 5 | + |
| 6 | +REM Look in the same places as deps\crates\cargo_build.py. |
| 7 | +SET "cargo_cmd=cargo" |
| 8 | +IF DEFINED CARGO SET "cargo_cmd=%CARGO%" |
| 9 | + |
| 10 | +IF EXIST "%cargo_cmd%" EXIT /B 0 |
| 11 | + |
| 12 | +FOR /F "delims=" %%a IN ('where "%cargo_cmd%" 2^> NUL') DO ( |
| 13 | + EXIT /B 0 |
| 14 | +) |
| 15 | + |
| 16 | +IF EXIST "%USERPROFILE%\.cargo\bin\cargo.exe" EXIT /B 0 |
| 17 | + |
| 18 | +EXIT /B 1 |
Collapse file
Copy file name to clipboardExpand all lines: vcbuild.bat +12Lines changed: 12 additions & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -297,6 +297,18 @@ REM NASM is only needed on x86_64. |
297 | 297 | if not defined openssl_no_asm if "%target_arch%" NEQ "arm64" call tools\msvs\find_nasm.cmd |
298 | 298 | if errorlevel 1 echo Could not find NASM, install it or build with openssl-no-asm. See BUILDING.md. |
299 | 299 |
|
| 300 | +REM cargo is needed to build the Rust crates used for Temporal. |
| 301 | +if defined nobuild goto skip-find-cargo |
| 302 | +if "%target%"=="Clean" goto skip-find-cargo |
| 303 | +echo %configure_flags% | findstr /C:"--v8-disable-temporal-support" /C:"--shared-temporal_capi" >NUL && goto skip-find-cargo |
| 304 | +call tools\msvs\find_cargo.cmd |
| 305 | +if errorlevel 1 ( |
| 306 | + echo Could not find cargo, install the Rust toolchain. See BUILDING.md. |
| 307 | + set exit_code=1 |
| 308 | + goto exit |
| 309 | +) |
| 310 | +:skip-find-cargo |
| 311 | + |
300 | 312 | call :getnodeversion || exit /b 1 |
301 | 313 |
|
302 | 314 | @REM Forcing ClangCL usage for version 24 and above |
|