mirror of
https://github.com/nodejs/node.git
synced 2026-11-24 21:50:36 -05:00
On Windows, configure.py returns from check_compiler() before it gets to the cargo and rustc check, so Temporal stays enabled even when no Rust toolchain is installed. The build then runs for a long time and fails in node_crates.vcxproj with MSB8066. Check for cargo in vcbuild.bat before configuring and building, in the same places deps/crates/cargo_build.py looks, and stop with a message pointing to BUILDING.md. The check is skipped for nobuild, clean, and when Temporal is disabled or provided as a shared library. Assisted-by: a closed-source coding agent Signed-off-by: vedchaudhari <vedc2853@gmail.com> PR-URL: https://github.com/nodejs/node/pull/66858 Fixes: https://github.com/nodejs/node/issues/66848 Refs: https://github.com/nodejs/node/issues/63451 Reviewed-By: Mike McCready <66998419+MikeMcC399@users.noreply.github.com> Reviewed-By: Stefan Stojanovic <stefan.stojanovic@janeasystems.com> Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
19 lines
373 B
Batchfile
19 lines
373 B
Batchfile
@IF NOT DEFINED DEBUG_HELPER @ECHO OFF
|
|
SETLOCAL
|
|
|
|
ECHO Looking for cargo
|
|
|
|
REM Look in the same places as deps\crates\cargo_build.py.
|
|
SET "cargo_cmd=cargo"
|
|
IF DEFINED CARGO SET "cargo_cmd=%CARGO%"
|
|
|
|
IF EXIST "%cargo_cmd%" EXIT /B 0
|
|
|
|
FOR /F "delims=" %%a IN ('where "%cargo_cmd%" 2^> NUL') DO (
|
|
EXIT /B 0
|
|
)
|
|
|
|
IF EXIST "%USERPROFILE%\.cargo\bin\cargo.exe" EXIT /B 0
|
|
|
|
EXIT /B 1
|