Skip to content

Add Arm64 Windows CI jobs #15790

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

Merged
merged 1 commit into from
Aug 21, 2025
Merged

Conversation

dpaoliello
Copy link
Contributor

The aarch64-pc-windows-msvc target is on the path to being promoted to Tier 1: rust-lang/rfcs#3817

Adding Arm64 Windows runners will catch any potential issues in Cargo before changes are merged in, instead of waiting for the Cargo submodule to be updated.

@rustbot rustbot added the A-infrastructure Area: infrastructure around the cargo repo, ci, releases, etc. label Jul 30, 2025
@dpaoliello dpaoliello marked this pull request as ready for review July 30, 2025 20:53
@rustbot
Copy link
Collaborator

rustbot commented Jul 30, 2025

r? @ehuss

rustbot has assigned @ehuss.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jul 30, 2025
Copy link
Member

@weihanglo weihanglo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Blocked on waiting for RFC being merged, but thanks anyway!

@Noratrieb
Copy link
Member

The RFC has been merged 🎉

@dpaoliello dpaoliello requested a review from weihanglo August 20, 2025 17:24
Copy link
Member

@weihanglo weihanglo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@weihanglo weihanglo added this pull request to the merge queue Aug 20, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Aug 20, 2025
@dpaoliello
Copy link
Contributor Author

Looks like build-std is currently broken? (Note that this is failing for x64 Linux, the new Arm64EC job passed):

    Blocking waiting for file lock on package cache
   Compiling compiler_builtins v0.1.160 (/home/runner/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/compiler-builtins/compiler-builtins)
   Compiling core v0.0.0 (/home/runner/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core)
   Compiling libc v0.2.174
   Compiling std v0.0.0 (/home/runner/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std)
   Compiling rustc-std-workspace-core v1.99.0 (/home/runner/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/rustc-std-workspace-core)
   Compiling alloc v0.0.0 (/home/runner/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc)
   Compiling cfg-if v1.0.1
   Compiling panic_abort v0.0.0 (/home/runner/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/panic_abort)
   Compiling rustc-demangle v0.1.26
   Compiling unwind v0.0.0 (/home/runner/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/unwind)
   Compiling rustc-std-workspace-alloc v1.99.0 (/home/runner/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/rustc-std-workspace-alloc)
   Compiling std_detect v0.1.5 (/home/runner/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std_detect)
   Compiling panic_unwind v0.0.0 (/home/runner/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/panic_unwind)
   Compiling hashbrown v0.15.5
error[E0152]: duplicate lang item in crate `core`: `sized`
  |
  = note: the lang item is first defined in crate `core` (which `std_detect` depends on)
  = note: first definition in `core` loaded from /home/runner/work/cargo/cargo/target/tmp/cit/t5/foo/target/debug/deps/libcore-2803056b1614b182.rmeta
  = note: second definition in `core` loaded from /home/runner/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcore-28a6d102916cede1.rlib

For more information about this error, try `rustc --explain E0152`.
error: could not compile `std_detect` (lib) due to 1 previous error
warning: build failed, waiting for other jobs to finish...

note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace


failures:
    test_panic_abort

@weihanglo
Copy link
Member

See https://rust-lang.zulipchat.com/#narrow/channel/246057-t-cargo/topic/.60build-std.60.20test.20failure/with/535198413 and rust-lang/rust#145619. Will be fixed tomorrow when new nightly is out I believe.

@ehuss
Copy link
Contributor

ehuss commented Aug 20, 2025

There are some changes that are needed before this can be merged. I'm not sure what changed in the past three weeks (maybe 1.89?).


warning[E0133]: call to unsafe function `windows_sys::Win32::System::JobObjects::CreateJobObjectW` is unsafe and requires unsafe block
  --> src\tools\cargo\src\cargo\util\job.rs:90:19
   |
90 |         let job = CreateJobObjectW(ptr::null_mut(), ptr::null());
   |                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function
   |
   = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
   = note: consult the function's documentation for information on how to avoid undefined behavior
note: an unsafe function restricts its caller, but its body is safe by default
  --> src\tools\cargo\src\cargo\util\job.rs:80:5
   |
80 |     pub unsafe fn setup() -> Option<Setup> {
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   = note: `#[warn(unsafe_op_in_unsafe_fn)]` (part of `#[warn(rust_2024_compatibility)]`) on by default

warning[E0133]: call to unsafe function `std::mem::zeroed` is unsafe and requires unsafe block
   --> src\tools\cargo\src\cargo\util\job.rs:101:16
    |
101 |         info = mem::zeroed();
    |                ^^^^^^^^^^^^^ call to unsafe function
    |
    = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
    = note: consult the function's documentation for information on how to avoid undefined behavior

warning[E0133]: call to unsafe function `windows_sys::Win32::System::JobObjects::SetInformationJobObject` is unsafe and requires unsafe block
   --> src\tools\cargo\src\cargo\util\job.rs:103:17
    |
103 |           let r = SetInformationJobObject(
    |  _________________^
104 | |             job.inner,
105 | |             JobObjectExtendedLimitInformation,
106 | |             addr_of!(info) as *const _,
107 | |             mem::size_of_val(&info) as u32,
108 | |         );
    | |_________^ call to unsafe function
    |
    = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
    = note: consult the function's documentation for information on how to avoid undefined behavior

warning[E0133]: call to unsafe function `windows_sys::Win32::System::Threading::GetCurrentProcess` is unsafe and requires unsafe block
   --> src\tools\cargo\src\cargo\util\job.rs:115:18
    |
115 |         let me = GetCurrentProcess();
    |                  ^^^^^^^^^^^^^^^^^^^ call to unsafe function
    |
    = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
    = note: consult the function's documentation for information on how to avoid undefined behavior

warning[E0133]: call to unsafe function `windows_sys::Win32::System::JobObjects::AssignProcessToJobObject` is unsafe and requires unsafe block
   --> src\tools\cargo\src\cargo\util\job.rs:116:17
    |
116 |         let r = AssignProcessToJobObject(job.inner, me);
    |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function
    |
    = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
    = note: consult the function's documentation for information on how to avoid undefined behavior

@weihanglo weihanglo added this pull request to the merge queue Aug 21, 2025
@weihanglo
Copy link
Member

Where did you see that Eric?

The current master didn't fail.

@ehuss
Copy link
Contributor

ehuss commented Aug 21, 2025

I ran it locally, but also https://triage.rust-lang.org/gha-logs/rust-lang/rust/48570988075#2025-08-21T12:21:45.8237728Z
As I said, something changed between when this PR was created and now. Maybe it was the edition change, although that was a while ago.

Merged via the queue into rust-lang:master with commit 15165ca Aug 21, 2025
26 checks passed
@rustbot rustbot removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Aug 21, 2025
@dpaoliello dpaoliello deleted the user/danpao/arm64 branch August 21, 2025 16:08
@weihanglo
Copy link
Member

I seee. We don't run clippy in every platforms. That is way. I'll fix that.

@weihanglo
Copy link
Member

#15876

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-infrastructure Area: infrastructure around the cargo repo, ci, releases, etc.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants