Skip to content

Commit

Permalink
added support for search and setup WSL for [amd64_]arm64
Browse files Browse the repository at this point in the history
  • Loading branch information
cocoa-xu committed Sep 23, 2024
1 parent 7b962b9 commit e05e2de
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions erts/etc/win32/wsl_tools/SetupWSLcross.bat
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ rem Usage: eval `cmd.exe /c SetupWSLcross.bat x64`

IF "%~1"=="x86" GOTO search
IF "%~1"=="x64" GOTO search
IF "%~1"=="arm64" GOTO search
IF "%~1"=="amd64_arm64" GOTO search
IF "%~1"=="x64_arm64" GOTO search

GOTO badarg

Expand Down Expand Up @@ -67,7 +70,12 @@ GOTO no_vcvars

:continue

FOR /F "delims==" %%F IN ('where cl.exe') DO SET _cl_exec_=%%F
FOR /F "delims==" %%F IN ('where cl.exe') DO (
SET _cl_exec_=%%F
goto set_cl_path
)

:set_cl_path
FOR %%F IN ("%_cl_exec_%") DO SET CL_PATH=%%~dpF

FOR /F "delims==" %%F IN ('where rc.exe') DO SET _rc_exec_=%%F
Expand All @@ -87,7 +95,7 @@ wsl.exe echo "# Eval this file eval \`cmd.exe /c SetupWSLcross.bat\`"
exit

:badarg
echo "Bad TARGET or not specified: %~1 expected x86 or x64"
echo "Bad TARGET or not specified: %~1 expected x86, x64, arm64 or amd64_arm64(x64_arm64)"
exit

:no_vcvars
Expand Down

0 comments on commit e05e2de

Please sign in to comment.