Skip to content
Merged
Show file tree
Hide file tree
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
18 changes: 18 additions & 0 deletions tools/msvs/find_cargo.cmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
@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
12 changes: 12 additions & 0 deletions vcbuild.bat
Original file line number Diff line number Diff line change
Expand Up @@ -297,6 +297,18 @@ REM NASM is only needed on x86_64.
if not defined openssl_no_asm if "%target_arch%" NEQ "arm64" call tools\msvs\find_nasm.cmd
if errorlevel 1 echo Could not find NASM, install it or build with openssl-no-asm. See BUILDING.md.

REM cargo is needed to build the Rust crates used for Temporal.
if defined nobuild goto skip-find-cargo
if "%target%"=="Clean" goto skip-find-cargo
echo %configure_flags% | findstr /C:"--v8-disable-temporal-support" /C:"--shared-temporal_capi" >NUL && goto skip-find-cargo
call tools\msvs\find_cargo.cmd
if errorlevel 1 (
echo Could not find cargo, install the Rust toolchain. See BUILDING.md.
set exit_code=1
goto exit
)
:skip-find-cargo

call :getnodeversion || exit /b 1

@REM Forcing ClangCL usage for version 24 and above
Expand Down
Loading