Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added support for search and setup WSL for [amd64_]arm64 #8847

Merged
merged 1 commit into from
Sep 26, 2024

Conversation

cocoa-xu
Copy link
Contributor

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 either arm64 or amd64_arm64 (x64_arm64) for its first parameter

    arm64, amd64_arm64 and x64_arm64 are the official values used in the vcvarsall.bat script, vcvarsall syntax.

    arm64 means to set up the environment when compiling natively, whereas amd64_arm64 and x64_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 two cl.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.

    > where cl.exe
    INFO: Could not find files for the given pattern(s).
    > C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvarsall.bat amd64_arm64
    > where cl.exe
    C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.39.33519\bin\Hostx64\arm64\cl.exe
    C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.39.33519\bin\Hostx64\x64\cl.exe
    

    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.

Copy link
Contributor

github-actions bot commented Sep 23, 2024

CT Test Results

    3 files    141 suites   49m 52s ⏱️
1 588 tests 1 539 ✅ 49 💤 0 ❌
2 292 runs  2 223 ✅ 69 💤 0 ❌

Results for commit e05e2de.

♻️ This comment has been updated with latest results.

To speed up review, make sure that you have read Contributing to Erlang/OTP and that all checks pass.

See the TESTING and DEVELOPMENT HowTo guides for details about how to run test locally.

Artifacts

// Erlang/OTP Github Action Bot

@dgud dgud added the testing currently being tested, tag is used by OTP internal CI label Sep 26, 2024
@dgud dgud self-assigned this Sep 26, 2024
@dgud dgud merged commit af74376 into erlang:master Sep 26, 2024
17 checks passed
@cocoa-xu cocoa-xu deleted the cx-setup-wsl-cross branch September 26, 2024 14:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
testing currently being tested, tag is used by OTP internal CI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants