Skip to content

Conversation

@mati865
Copy link
Member

@mati865 mati865 commented Nov 9, 2025

Fixes #144656

@rustbot rustbot added A-CI Area: Our Github Actions CI A-testsuite Area: The testsuite used to check the correctness of rustc S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-infra Relevant to the infrastructure team, which will review and decide on the PR/issue. labels Nov 9, 2025
@mati865 mati865 force-pushed the gnullvm-windows-host branch from 77caef1 to f43d076 Compare November 11, 2025 17:52
@mati865

This comment was marked as resolved.

@rust-bors

This comment has been minimized.

rust-bors bot added a commit that referenced this pull request Nov 11, 2025
Build gnullvm toolchains on Windows natively

try-job: dist-aarch64-llvm-mingw
try-job: dist-x86_64-llvm-mingw
try-job: dist-x86_64-mingw
@rust-log-analyzer

This comment has been minimized.

@rust-bors

This comment was marked as resolved.

@mati865 mati865 force-pushed the gnullvm-windows-host branch from f43d076 to ad462aa Compare November 11, 2025 19:11
@mati865

This comment was marked as resolved.

@rust-bors

This comment has been minimized.

rust-bors bot added a commit that referenced this pull request Nov 11, 2025
Build gnullvm toolchains on Windows natively

try-job: dist-aarch64-llvm-mingw
try-job: dist-x86_64-llvm-mingw
try-job: dist-x86_64-mingw
@rust-log-analyzer

This comment has been minimized.

@rust-bors

This comment was marked as resolved.

@mati865

This comment was marked as resolved.

@rust-bors

This comment has been minimized.

rust-bors bot added a commit that referenced this pull request Nov 11, 2025
Build gnullvm toolchains on Windows natively

try-job: dist-aarch64-llvm-mingw
try-job: dist-x86_64-llvm-mingw
try-job: dist-x86_64-mingw
@rust-log-analyzer

This comment has been minimized.

@rust-bors

This comment was marked as resolved.

@mati865

This comment was marked as resolved.

@rust-bors

This comment has been minimized.

rust-bors bot added a commit that referenced this pull request Nov 11, 2025
Build gnullvm toolchains on Windows natively

try-job: dist-aarch64-llvm-mingw
try-job: dist-x86_64-llvm-mingw
try-job: dist-x86_64-mingw
@rust-log-analyzer

This comment has been minimized.

@rust-bors

This comment was marked as resolved.

@mati865

This comment was marked as resolved.

@rust-bors

This comment has been minimized.

@marcoieni
Copy link
Member

Thanks, I think this PR is small enough 👍

@bors r+

@bors
Copy link
Collaborator

bors commented Nov 25, 2025

📌 Commit ab169ed has been approved by marcoieni

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Nov 25, 2025
jhpratt added a commit to jhpratt/rust that referenced this pull request Nov 26, 2025
…rcoieni

Build gnullvm toolchains on Windows natively

Fixes rust-lang#144656
bors added a commit that referenced this pull request Nov 26, 2025
Rollup of 9 pull requests

Successful merges:

 - #147936 (Offload intrinsic)
 - #148358 (Fix some issues around `rustc_public`)
 - #148452 (Mangle symbols with a mangled name close to PDB limits with v0 instead of legacy mangling to avoid linker errors)
 - #148751 (Build gnullvm toolchains on Windows natively)
 - #148951 (rustc_target: aarch64: Remove deprecated FEAT_TME)
 - #149173 (Use rust rather than LLVM target features in the target spec)
 - #149307 (Deny const auto traits)
 - #149312 (Mark riscv64gc-unknown-linux-musl as tier 2 target)
 - #149341 (Add `Copy` to some AST enums.)

r? `@ghost`
`@rustbot` modify labels: rollup
Zalathar added a commit to Zalathar/rust that referenced this pull request Nov 26, 2025
…rcoieni

Build gnullvm toolchains on Windows natively

Fixes rust-lang#144656
bors added a commit that referenced this pull request Nov 26, 2025
Rollup of 12 pull requests

Successful merges:

 - #147936 (Offload intrinsic)
 - #148358 (Fix some issues around `rustc_public`)
 - #148452 (Mangle symbols with a mangled name close to PDB limits with v0 instead of legacy mangling to avoid linker errors)
 - #148751 (Build gnullvm toolchains on Windows natively)
 - #148951 (rustc_target: aarch64: Remove deprecated FEAT_TME)
 - #149149 ([rustdoc] misc search index cleanups)
 - #149173 (Use rust rather than LLVM target features in the target spec)
 - #149307 (Deny const auto traits)
 - #149312 (Mark riscv64gc-unknown-linux-musl as tier 2 target)
 - #149317 (Handle inline asm in has_ffi_unwind_calls)
 - #149326 (Remove unused `Clone` derive on `DelayedLint`)
 - #149341 (Add `Copy` to some AST enums.)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit e636017 into rust-lang:main Nov 26, 2025
12 checks passed
@rustbot rustbot added this to the 1.93.0 milestone Nov 26, 2025
rust-timer added a commit that referenced this pull request Nov 26, 2025
Rollup merge of #148751 - mati865:gnullvm-windows-host, r=marcoieni

Build gnullvm toolchains on Windows natively

Fixes #144656
github-actions bot pushed a commit to rust-lang/rustc-dev-guide that referenced this pull request Nov 27, 2025
Rollup of 12 pull requests

Successful merges:

 - rust-lang/rust#147936 (Offload intrinsic)
 - rust-lang/rust#148358 (Fix some issues around `rustc_public`)
 - rust-lang/rust#148452 (Mangle symbols with a mangled name close to PDB limits with v0 instead of legacy mangling to avoid linker errors)
 - rust-lang/rust#148751 (Build gnullvm toolchains on Windows natively)
 - rust-lang/rust#148951 (rustc_target: aarch64: Remove deprecated FEAT_TME)
 - rust-lang/rust#149149 ([rustdoc] misc search index cleanups)
 - rust-lang/rust#149173 (Use rust rather than LLVM target features in the target spec)
 - rust-lang/rust#149307 (Deny const auto traits)
 - rust-lang/rust#149312 (Mark riscv64gc-unknown-linux-musl as tier 2 target)
 - rust-lang/rust#149317 (Handle inline asm in has_ffi_unwind_calls)
 - rust-lang/rust#149326 (Remove unused `Clone` derive on `DelayedLint`)
 - rust-lang/rust#149341 (Add `Copy` to some AST enums.)

r? `@ghost`
`@rustbot` modify labels: rollup
@purplesyringa
Copy link
Contributor

purplesyringa commented Dec 1, 2025

This PR seems to have broken i686-pc-windows-gnullvm. It was previously built as part of the dist-x86_64-windows-gnullvm job, but is no longer built. See components history. Can someone more knowledgeable than me check if this would be an easy fix?

@mati865 mati865 deleted the gnullvm-windows-host branch December 1, 2025 12:25
@mati865
Copy link
Member Author

mati865 commented Dec 1, 2025

Oh, good catch, I forgot about that. Sorry.

I'll fix it soon.

@mati865
Copy link
Member Author

mati865 commented Dec 1, 2025

Opened #149504

bors added a commit that referenced this pull request Dec 2, 2025
Bring back i686-pc-windows-gnullvm target

#148751 inadvertently removed i686-pc-windows-gnullvm std build when migrating to native CI runners. Since this change was not agreed upon, we should bring back prebuilt std builds for that target.

There are a few runners that could do it: dist-aarch64-llvm-mingw, dist-x86_64-llvm-mingw, dist-various-1 and dist-various-2.
dist-x86_64-llvm-mingw already takes slightly over 2 hours, so the faster dist-aarch64-llvm-mingw is a better choice.
We can also use dist-various-x job, they don't have llvm-mingw toolchain, but it's trivial to install one.
@mati865
Copy link
Member Author

mati865 commented Dec 3, 2025

@purplesyringa the issue is fixed:

❯ rustup target add i686-pc-windows-gnullvm --toolchain nightly
info: downloading component 'rust-std' for 'i686-pc-windows-gnullvm'
info: installing component 'rust-std' for 'i686-pc-windows-gnullvm'

@purplesyringa
Copy link
Contributor

purplesyringa commented Dec 3, 2025

My CI is failing to run rustc with 0xc000007b (STATUS_INVALID_IMAGE_FORMAT):

https://github.com/iex-rs/lithium/actions/runs/19897038895/job/57030061366

Are you sure it isn't accidentally compiling 64-bit code or targeting ARM or something?

@mati865
Copy link
Member Author

mati865 commented Dec 3, 2025

I'm certain the binary format is correct:

❯ llvm-readobj -l ~/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/i686-pc-windows-gnullvm/lib/std-5ac4ffe96771648c.dll

File: /home/mateusz/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/i686-pc-windows-gnullvm/lib/std-5ac4ffe96771648c.dll
Format: COFF-i386
Arch: i386
AddressSize: 32bit

for the reference AArch64 DLL shows:

❯ llvm-readobj -l ~/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/aarch64-pc-windows-gnullvm/lib/std-f933da923d5e926c.dll

File: /home/mateusz/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/aarch64-pc-windows-gnullvm/lib/std-f933da923d5e926c.dll
Format: COFF-ARM64
Arch: aarch64
AddressSize: 64bit

For the completeness, linking and running the binary built for i686-pc-windows-gnullvm on amd64 Linux:

❯ cargo +nightly rustc --target i686-pc-windows-gnullvm -- -Cprefer-dynamic
   Compiling hello v0.1.0 (/tmp/hello)
    Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.05s

# just to see which libraries are missing, it should require to load libstd
❯ wine target/i686-pc-windows-gnullvm/debug/hello.exe
0134:err:environ:init_peb starting L"Z:\\tmp\\hello\\target\\i686-pc-windows-gnullvm\\debug\\hello.exe" in experimental wow64 mode
0134:err:module:import_dll Library std-5ac4ffe96771648c.dll (which is needed by L"Z:\\tmp\\hello\\target\\i686-pc-windows-gnullvm\\debug\\hello.exe") not found
0134:err:module:import_dll Library libunwind.dll (which is needed by L"Z:\\tmp\\hello\\target\\i686-pc-windows-gnullvm\\debug\\hello.exe") not found
0134:err:module:loader_init Importing dlls for L"Z:\\tmp\\hello\\target\\i686-pc-windows-gnullvm\\debug\\hello.exe" failed, status c0000135

❯ WINEPATH="$HOME/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/i686-pc-windows-gnullvm/lib;/opt/llvm-mingw/llvm-mingw-ucrt/i686-w64-mingw32/bin" wine target/i686-pc-windows-gnullvm/debug/hello.exe
012c:err:environ:init_peb starting L"Z:\\tmp\\hello\\target\\i686-pc-windows-gnullvm\\debug\\hello.exe" in experimental wow64 mode
Hello, world!

Notice that in your case it's i686-pc-windows-gnu (not gnullvm) rustc that fails:
error: process didn't exit successfully: C:\Users\runneradmin.rustup\toolchains\nightly-i686-pc-windows-gnu\bin\rustc.exe -vV (exit code: 0xc000007b)

I can reproduce i686-pc-windows-gnu issue locally:

❯ wine ~/.rustup/toolchains/nightly-i686-pc-windows-gnu/bin/rustc.exe -vV
012c:err:environ:init_peb starting L"Z:\\home\\mateusz\\.rustup\\toolchains\\nightly-i686-pc-windows-gnu\\bin\\rustc.exe" in experimental wow64 mode
012c:err:module:import_dll Loading library libwinpthread-1.dll (which is needed by L"Z:\\home\\mateusz\\.rustup\\toolchains\\nightly-i686-pc-windows-gnu\\bin\\libgcc_s_dw2-1.dll") failed (error c000007b).
...

❯ llvm-readobj -l ~/.rustup/toolchains/nightly-i686-pc-windows-gnu/bin/libwinpthread-1.dll

File: /home/mateusz/.rustup/toolchains/nightly-i686-pc-windows-gnu/bin/libwinpthread-1.dll
Format: COFF-x86-64
Arch: x86_64
AddressSize: 64bit

Somehow, the dist picks up amd64 libs.

Has it started with the latest nightly? Also, I'd recommend moving to a new issue.

EDIT: #149516 broke it

@purplesyringa
Copy link
Contributor

purplesyringa commented Dec 3, 2025

Both gnu and gnullvm failed with 0xc000007b, which is why I thought it was somehow related to native builds; though I didn't realize your PR didn't touch gnu at all, sorry. Let's move the discussion to that PR?

makai410 pushed a commit to makai410/rustc_public that referenced this pull request Dec 10, 2025
Rollup of 12 pull requests

Successful merges:

 - rust-lang/rust#147936 (Offload intrinsic)
 - rust-lang/rust#148358 (Fix some issues around `rustc_public`)
 - rust-lang/rust#148452 (Mangle symbols with a mangled name close to PDB limits with v0 instead of legacy mangling to avoid linker errors)
 - rust-lang/rust#148751 (Build gnullvm toolchains on Windows natively)
 - rust-lang/rust#148951 (rustc_target: aarch64: Remove deprecated FEAT_TME)
 - rust-lang/rust#149149 ([rustdoc] misc search index cleanups)
 - rust-lang/rust#149173 (Use rust rather than LLVM target features in the target spec)
 - rust-lang/rust#149307 (Deny const auto traits)
 - rust-lang/rust#149312 (Mark riscv64gc-unknown-linux-musl as tier 2 target)
 - rust-lang/rust#149317 (Handle inline asm in has_ffi_unwind_calls)
 - rust-lang/rust#149326 (Remove unused `Clone` derive on `DelayedLint`)
 - rust-lang/rust#149341 (Add `Copy` to some AST enums.)

r? `@ghost`
`@rustbot` modify labels: rollup
makai410 pushed a commit to makai410/rust that referenced this pull request Dec 10, 2025
…rcoieni

Build gnullvm toolchains on Windows natively

Fixes rust-lang#144656
makai410 pushed a commit to makai410/rust that referenced this pull request Dec 10, 2025
Rollup of 12 pull requests

Successful merges:

 - rust-lang#147936 (Offload intrinsic)
 - rust-lang#148358 (Fix some issues around `rustc_public`)
 - rust-lang#148452 (Mangle symbols with a mangled name close to PDB limits with v0 instead of legacy mangling to avoid linker errors)
 - rust-lang#148751 (Build gnullvm toolchains on Windows natively)
 - rust-lang#148951 (rustc_target: aarch64: Remove deprecated FEAT_TME)
 - rust-lang#149149 ([rustdoc] misc search index cleanups)
 - rust-lang#149173 (Use rust rather than LLVM target features in the target spec)
 - rust-lang#149307 (Deny const auto traits)
 - rust-lang#149312 (Mark riscv64gc-unknown-linux-musl as tier 2 target)
 - rust-lang#149317 (Handle inline asm in has_ffi_unwind_calls)
 - rust-lang#149326 (Remove unused `Clone` derive on `DelayedLint`)
 - rust-lang#149341 (Add `Copy` to some AST enums.)

r? `@ghost`
`@rustbot` modify labels: rollup
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-CI Area: Our Github Actions CI A-testsuite Area: The testsuite used to check the correctness of rustc S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-infra Relevant to the infrastructure team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Tracking issue for cleanup of gnullvm building process

6 participants