From 21991417b2354593db5ec23451d6842544a27af1 Mon Sep 17 00:00:00 2001 From: Stefan Stojanovic Date: Sat, 24 Dec 2022 21:20:39 +0100 Subject: [PATCH] build: fix arm64 cross-compile from powershell Starting vcbuild.bat for cross-compiling from powershell was failing the licensertf step because it couldn't find x64_node_exe after downloading. PR-URL: https://github.com/nodejs/node/pull/45890 Reviewed-By: James M Snell Reviewed-By: Luigi Pinca --- vcbuild.bat | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vcbuild.bat b/vcbuild.bat index e2c2e064452067..dc9ff39ed6644c 100644 --- a/vcbuild.bat +++ b/vcbuild.bat @@ -416,13 +416,13 @@ if not defined licensertf goto stage_package set "use_x64_node_exe=false" if "%target_arch%"=="arm64" if "%PROCESSOR_ARCHITECTURE%"=="AMD64" set "use_x64_node_exe=true" +set "x64_node_exe=temp-vcbuild\node-x64-cross-compiling.exe" if "%use_x64_node_exe%"=="true" ( echo Cross-compilation to ARM64 detected. We'll use the x64 Node executable for license2rtf. - if not defined "%x64_node_exe%" set "x64_node_exe=temp-vcbuild\node-x64-cross-compiling.exe" if not exist "%x64_node_exe%" ( echo Downloading x64 node.exe... if not exist "temp-vcbuild" mkdir temp-vcbuild - powershell -c "Invoke-WebRequest -Uri 'https://nodejs.org/dist/latest/win-x64/node.exe' -OutFile 'temp-vcbuild\node-x64-cross-compiling.exe'" + powershell -c "Invoke-WebRequest -Uri 'https://nodejs.org/dist/latest/win-x64/node.exe' -OutFile '%x64_node_exe%'" ) if not exist "%x64_node_exe%" ( echo Could not find the Node executable at the given x64_node_exe path. Aborting.