added support for search and setup WSL for [amd64_]arm64
#8847
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR is one of the smaller PRs separated from the original PR #8142 that attempts to add initial support for ARM64 windows.
In this PR,
SetupWSLcross.bat
can also accept eitherarm64
oramd64_arm64
(x64_arm64
) for its first parameterarm64
,amd64_arm64
andx64_arm64
are the official values used in thevcvarsall.bat
script, vcvarsall syntax.arm64
means to set up the environment when compiling natively, whereasamd64_arm64
andx64_arm64
means to set up the cross-compiling environment on an amd64 host machine for the arm64 target machine.Updated relevant lines for setting the path for
cl.exe
When cross-compiling, e.g., after executing
vcvarsall.bat amd64_arm64
, we can see twocl.exe
in PATH with the first one being the cross-compiler for the arm64 target, and the second one being the native compiler for the amd64 host machine.In this script,
CL_PATH
should be set to the directory that contains the cross-compiler, therefore, we need to remember the first one in_cl_exec_
and then break from the for-loop.