Skip to content

bootstrap: refactor mingw dist and fix gnullvm #144659

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 3 commits into from
Aug 7, 2025

Conversation

mati865
Copy link
Member

@mati865 mati865 commented Jul 29, 2025

Fixes #144533

The first two commits are NFC and only clean up the code, paving the way for the third commit. That said, I think they are worthwhile even without that fix - reusing the same function for two different outcomes was confusing.

The third commit is the fix for #144533, but due to the cross-compilation dance it requires a workaround to find the DLL since that logic really was meant only for Windows builders. That workaround is short-lived and will be removed as soon as gnullvm bootstraps itself.

@rustbot rustbot added 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) labels Jul 29, 2025
@mati865
Copy link
Member Author

mati865 commented Jul 29, 2025

@bors try jobs=dist-aarch64-windows-gnullvm,dist-x86_64-windows-gnullvm,dist-i686-windows-gnu,dist-x86_64-windows-gnu

Also including regular windows-gnu to double-check there is no regression there.

@rust-bors
Copy link

rust-bors bot commented Jul 29, 2025

⌛ Trying commit cc7a7a5 with merge 7fe80ed

To cancel the try build, run the command @bors try cancel.

rust-bors bot added a commit that referenced this pull request Jul 29, 2025
bootstrap: extract cc query into a new function

try-job: dist-aarch64-windows-gnullvm
try-job: dist-x86_64-windows-gnullvm
try-job: dist-i686-windows-gnu
try-job: dist-x86_64-windows-gnu
@rust-bors
Copy link

rust-bors bot commented Jul 29, 2025

💔 Test failed (CI). Failed job:

@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@mati865
Copy link
Member Author

mati865 commented Jul 30, 2025

@bors try jobs=dist-aarch64-windows-gnullvm,dist-x86_64-windows-gnullvm,dist-i686-mingw,dist-x86_64-mingw

@rust-bors
Copy link

rust-bors bot commented Jul 30, 2025

⌛ Trying commit cc7a7a5 with merge 77b2b72

To cancel the try build, run the command @bors try cancel.

rust-bors bot added a commit that referenced this pull request Jul 30, 2025
bootstrap: extract cc query into a new function

try-job: dist-aarch64-windows-gnullvm
try-job: dist-x86_64-windows-gnullvm
try-job: dist-i686-mingw
try-job: dist-x86_64-mingw
@rust-bors
Copy link

rust-bors bot commented Jul 30, 2025

☀️ Try build successful (CI)
Build commit: 77b2b72 (77b2b72bf88b5e4f2344d9364b0e76c1595e3c1f, parent: ba7e63b63871a429533c189adbfb1d9a6337e000)

@mati865
Copy link
Member Author

mati865 commented Jul 30, 2025

Tested the changes against parent commit using the following commands on Linux:

  1. preparation (removed output to reduce clutter):
rustup-toolchain-install-master -n ba7e63b-amd64-gnu -i x86_64-pc-windows-gnu ba7e63b63871a429533c189adbfb1d9a6337e000
rustup-toolchain-install-master -n 77b2b72-amd64-gnu -i x86_64-pc-windows-gnu 77b2b72bf88b5e4f2344d9364b0e76c1595e3c1f

rustup-toolchain-install-master -n ba7e63b-amd64-gnu-with-mingw -i x86_64-pc-windows-gnu ba7e63b63871a429533c189adbfb1d9a6337e000 -c rust-mingw
rustup-toolchain-install-master -n 77b2b72-amd64-gnu-with-mingw -i x86_64-pc-windows-gnu 77b2b72bf88b5e4f2344d9364b0e76c1595e3c1f -c rust-mingw

rustup-toolchain-install-master -n ba7e63b-i686-gnu -i i686-pc-windows-gnu ba7e63b63871a429533c189adbfb1d9a6337e000
rustup-toolchain-install-master -n 77b2b72-i686-gnu -i i686-pc-windows-gnu 77b2b72bf88b5e4f2344d9364b0e76c1595e3c1f

rustup-toolchain-install-master -n ba7e63b-i686-gnu-with-mingw -i i686-pc-windows-gnu ba7e63b63871a429533c189adbfb1d9a6337e000 -c rust-mingw
rustup-toolchain-install-master -n 77b2b72-i686-gnu-with-mingw -i i686-pc-windows-gnu 77b2b72bf88b5e4f2344d9364b0e76c1595e3c1f -c rust-mingw

rustup-toolchain-install-master -n ba7e63b-amd64-gnullvm -i x86_64-pc-windows-gnullvm ba7e63b63871a429533c189adbfb1d9a6337e000
rustup-toolchain-install-master -n 77b2b72-amd64-gnullvm -i x86_64-pc-windows-gnullvm 77b2b72bf88b5e4f2344d9364b0e76c1595e3c1f

rustup-toolchain-install-master -n ba7e63b-aarch64-gnullvm -i aarch64-pc-windows-gnullvm ba7e63b63871a429533c189adbfb1d9a6337e000
rustup-toolchain-install-master -n 77b2b72-aarch64-gnullvm -i aarch64-pc-windows-gnullvm 77b2b72bf88b5e4f2344d9364b0e76c1595e3c1f
  1. diffing (Bash syntax via Brush):
comm -3 \
   <(fd . -t f --relative-path --base-directory ~/.rustup/toolchains/77b2b72-amd64-gnu | sort) \
   <(fd . -t f --relative-path --base-directory ~/.rustup/toolchains/ba7e63b-amd64-gnu | sort)
   
comm -3 \
   <(fd . -t f --relative-path --base-directory ~/.rustup/toolchains/77b2b72-amd64-gnu-with-mingw | sort) \
   <(fd . -t f --relative-path --base-directory ~/.rustup/toolchains/ba7e63b-amd64-gnu-with-mingw | sort)
   
comm -3 \
   <(fd . -t f --relative-path --base-directory ~/.rustup/toolchains/77b2b72-i686-gnu | sort) \
   <(fd . -t f --relative-path --base-directory ~/.rustup/toolchains/ba7e63b-i686-gnu | sort)
   
comm -3 \
   <(fd . -t f --relative-path --base-directory ~/.rustup/toolchains/77b2b72-i686-gnu-with-mingw | sort) \
   <(fd . -t f --relative-path --base-directory ~/.rustup/toolchains/ba7e63b-i686-gnu-with-mingw | sort)
   
comm -3 \
   <(fd . -t f --relative-path --base-directory ~/.rustup/toolchains/77b2b72-amd64-gnullvm | sort) \
   <(fd . -t f --relative-path --base-directory ~/.rustup/toolchains/ba7e63b-amd64-gnullvm | sort)
   
comm -3 \
   <(fd . -t f --relative-path --base-directory ~/.rustup/toolchains/77b2b72-aarch64-gnullvm | sort) \
   <(fd . -t f --relative-path --base-directory ~/.rustup/toolchains/ba7e63b-aarch64-gnullvm | sort)
bin/libunwind.dll
lib/rustlib/x86_64-pc-windows-gnullvm/bin/libunwind.dll
share/doc/COPYING3
share/doc/COPYING.RUNTIME
share/doc/README.txt
bin/libunwind.dll
lib/rustlib/aarch64-pc-windows-gnullvm/bin/libunwind.dll
share/doc/COPYING3
share/doc/COPYING.RUNTIME
share/doc/README.txt
  1. quick confirmation the locations are correct:
❯ fd libunwind.dll /home/mateusz/.rustup/toolchains
/home/mateusz/.rustup/toolchains/77b2b72-aarch64-gnullvm/bin/libunwind.dll
/home/mateusz/.rustup/toolchains/77b2b72-aarch64-gnullvm/lib/rustlib/aarch64-pc-windows-gnullvm/bin/libunwind.dll
/home/mateusz/.rustup/toolchains/77b2b72-amd64-gnullvm/bin/libunwind.dll
/home/mateusz/.rustup/toolchains/77b2b72-amd64-gnullvm/lib/rustlib/x86_64-pc-windows-gnullvm/bin/libunwind.dll
  1. sanity check by running amd64 compiler (my only AArch64 HW is an old RPi, so I didn't bother running it):
❯ wine /home/mateusz/.rustup/toolchains/77b2b72-amd64-gnullvm/bin/rustc.exe -vV
00b8:fixme:wineusb:query_id Unhandled ID query type 0x5.
00b8:fixme:wineusb:query_id Unhandled ID query type 0x5.
00b8:fixme:wineusb:query_id Unhandled ID query type 0x5.
00b8:fixme:wineusb:query_id Unhandled ID query type 0x5.
00b8:fixme:wineusb:query_id Unhandled ID query type 0x5.
00b8:fixme:wineusb:query_id Unhandled ID query type 0x5.
rustc 1.90.0-nightly (77b2b72bf 2025-07-30)
binary: rustc
commit-hash: 77b2b72bf88b5e4f2344d9364b0e76c1595e3c1f
commit-date: 2025-07-30
host: x86_64-pc-windows-gnullvm
release: 1.90.0-nightly
0024:fixme:file:NtFsControlFile FSCTL_GET_REPARSE_POINT semi-stub
LLVM version: 20.1.8

❯ wine /home/mateusz/.rustup/toolchains/ba7e63b-amd64-gnullvm/bin/rustc.exe -vV
00b8:fixme:wineusb:query_id Unhandled ID query type 0x5.
00b8:fixme:wineusb:query_id Unhandled ID query type 0x5.
00b8:fixme:wineusb:query_id Unhandled ID query type 0x5.
00b8:fixme:wineusb:query_id Unhandled ID query type 0x5.
00b8:fixme:wineusb:query_id Unhandled ID query type 0x5.
00b8:fixme:wineusb:query_id Unhandled ID query type 0x5.
0024:err:module:import_dll Library libunwind.dll (which is needed by L"Z:\\home\\mateusz\\.rustup\\toolchains\\ba7e63b-amd64-gnullvm\\bin\\rustc_driver-b7009de26466cbbd.dll") not found
0024:err:module:import_dll Library rustc_driver-b7009de26466cbbd.dll (which is needed by L"Z:\\home\\mateusz\\.rustup\\toolchains\\ba7e63b-amd64-gnullvm\\bin\\rustc.exe") not found
0024:err:module:loader_init Importing dlls for L"Z:\\home\\mateusz\\.rustup\\toolchains\\ba7e63b-amd64-gnullvm\\bin\\rustc.exe" failed, status c0000135

I hope this clearly (albeit in a lengthy way) shows no regression for *windows-gnu toolchains and the fix for windows-gnullvm toolchains.

@mati865 mati865 force-pushed the gnullvm-vendor-libunwind branch from cc7a7a5 to e22a6ce Compare July 30, 2025 21:25
@mati865 mati865 marked this pull request as ready for review July 30, 2025 21:25
@rustbot
Copy link
Collaborator

rustbot commented Jul 30, 2025

r? @albertlarsan68

rustbot has assigned @albertlarsan68.
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 S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Jul 30, 2025
@mati865
Copy link
Member Author

mati865 commented Jul 30, 2025

Beta was branched already last week, right?

@mati865 mati865 changed the title bootstrap: extract cc query into a new function bootstrap: refactor mingw dist and fix gnullvm Jul 31, 2025
@mati865
Copy link
Member Author

mati865 commented Aug 2, 2025

Judging by their profile albertlarsan68 seems to be away right now, so I will take a liberty to reroll because the release is near and this might get backported for the next beta.

r? rust-lang/bootstrap

@rustbot rustbot assigned Kobzol and unassigned albertlarsan68 Aug 2, 2025
Copy link
Member

@Kobzol Kobzol left a comment

Choose a reason for hiding this comment

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

The first commits are a nice cleanup, thanks.

}
// FIXME(#144565): Remove this whole `let ...`
Copy link
Member

Choose a reason for hiding this comment

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

I don't understand the FIXME, it also refers to some other PR?

Copy link
Member Author

Choose a reason for hiding this comment

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

Good catch, I meant #144656

rustc_dlls.push("libgcc_s_dw2-1.dll");
} else {
rustc_dlls.push("libgcc_s_seh-1.dll");
}
} else {
Copy link
Member

Choose a reason for hiding this comment

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

I would spell gnullvm explicitly here, to make it more obvious which targets need libunwind.dll.

@mati865 mati865 force-pushed the gnullvm-vendor-libunwind branch from e22a6ce to d2e3ea9 Compare August 4, 2025 18:02
@bors bors added the S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. label Aug 4, 2025
Zalathar added a commit to Zalathar/rust that referenced this pull request Aug 5, 2025
…r=Kobzol

bootstrap: refactor mingw dist and fix gnullvm

Fixes rust-lang#144533

The first two commits are NFC and only clean up the code, paving the way for the third commit. That said, I think they are worthwhile even without that fix - reusing the same function for two different outcomes was confusing.

The third commit is the fix for rust-lang#144533, but due to the cross-compilation dance it requires a workaround to find the DLL since that logic really was meant only for Windows builders. That workaround is short-lived and will be removed as soon as gnullvm bootstraps itself.
bors added a commit that referenced this pull request Aug 5, 2025
Rollup of 16 pull requests

Successful merges:

 - #143857 (Port #[macro_export] to the new attribute parsing infrastructure)
 - #144133 (Stabilize const TypeId::of)
 - #144369 (Upgrade semicolon_in_expressions_from_macros from warn to deny)
 - #144443 (Make target pointer width in target json an integer)
 - #144473 (Address libunwind.a inconsistency issues in the bootstrap program)
 - #144659 (bootstrap: refactor mingw dist and fix gnullvm)
 - #144682 (Stabilize `strict_overflow_ops`)
 - #144794 (Port `#[coroutine]` to the new attribute system)
 - #144835 (Anonymize binders in tail call sig)
 - #144836 (Change visibility of Args new function)
 - #144900 (Stabilize `unsigned_signed_diff` feature)
 - #144903 (Rename `begin_panic_handler` to `panic_handler`)
 - #144910 (Add regression tests for seemingly fixed issues)
 - #144926 (Correct the use of `must_use` on btree::IterMut)
 - #144928 (Drop `rust-version` from `rustc_thread_pool`)
 - #144931 ([win][arm64ec] Fix msvc-wholearchive for Arm64EC)

Failed merges:

 - #144914 (Add support for `ty::Instance` path shortening in diagnostics)

r? `@ghost`
`@rustbot` modify labels: rollup
Kobzol added a commit to Kobzol/rust that referenced this pull request Aug 5, 2025
…r=Kobzol

bootstrap: refactor mingw dist and fix gnullvm

Fixes rust-lang#144533

The first two commits are NFC and only clean up the code, paving the way for the third commit. That said, I think they are worthwhile even without that fix - reusing the same function for two different outcomes was confusing.

The third commit is the fix for rust-lang#144533, but due to the cross-compilation dance it requires a workaround to find the DLL since that logic really was meant only for Windows builders. That workaround is short-lived and will be removed as soon as gnullvm bootstraps itself.
bors added a commit that referenced this pull request Aug 5, 2025
Rollup of 15 pull requests

Successful merges:

 - #143857 (Port #[macro_export] to the new attribute parsing infrastructure)
 - #144133 (Stabilize const TypeId::of)
 - #144369 (Upgrade semicolon_in_expressions_from_macros from warn to deny)
 - #144473 (Address libunwind.a inconsistency issues in the bootstrap program)
 - #144659 (bootstrap: refactor mingw dist and fix gnullvm)
 - #144682 (Stabilize `strict_overflow_ops`)
 - #144794 (Port `#[coroutine]` to the new attribute system)
 - #144835 (Anonymize binders in tail call sig)
 - #144836 (Change visibility of Args new function)
 - #144900 (Stabilize `unsigned_signed_diff` feature)
 - #144903 (Rename `begin_panic_handler` to `panic_handler`)
 - #144910 (Add regression tests for seemingly fixed issues)
 - #144926 (Correct the use of `must_use` on btree::IterMut)
 - #144928 (Drop `rust-version` from `rustc_thread_pool`)
 - #144931 ([win][arm64ec] Fix msvc-wholearchive for Arm64EC)

r? `@ghost`
`@rustbot` modify labels: rollup
Zalathar added a commit to Zalathar/rust that referenced this pull request Aug 6, 2025
…r=Kobzol

bootstrap: refactor mingw dist and fix gnullvm

Fixes rust-lang#144533

The first two commits are NFC and only clean up the code, paving the way for the third commit. That said, I think they are worthwhile even without that fix - reusing the same function for two different outcomes was confusing.

The third commit is the fix for rust-lang#144533, but due to the cross-compilation dance it requires a workaround to find the DLL since that logic really was meant only for Windows builders. That workaround is short-lived and will be removed as soon as gnullvm bootstraps itself.
bors added a commit that referenced this pull request Aug 6, 2025
Rollup of 21 pull requests

Successful merges:

 - #137831 (Tweak auto trait errors)
 - #138689 (add nvptx_target_feature)
 - #140267 (implement continue_ok and break_ok for ControlFlow)
 - #143679 (Preserve the .debug_gdb_scripts section)
 - #143857 (Port #[macro_export] to the new attribute parsing infrastructure)
 - #143929 (Mark all deprecation lints in name resolution as deny-by-default and report-in-deps)
 - #144133 (Stabilize const TypeId::of)
 - #144369 (Upgrade semicolon_in_expressions_from_macros from warn to deny)
 - #144473 (Address libunwind.a inconsistency issues in the bootstrap program)
 - #144498 (Add --print target-spec-json-schema)
 - #144552 (Rehome 33 `tests/ui/issues/` tests to other subdirectories under `tests/ui/`)
 - #144659 (bootstrap: refactor mingw dist and fix gnullvm)
 - #144676 (Add documentation for unstable_feature_bound)
 - #144794 (Port `#[coroutine]` to the new attribute system)
 - #144835 (Anonymize binders in tail call sig)
 - #144836 (Change visibility of Args new function)
 - #144861 (Stabilize `panic_payload_as_str` feature)
 - #144910 (Add regression tests for seemingly fixed issues)
 - #144913 ([rustdoc] Fix wrong `i` tooltip icon)
 - #144917 (Enforce tail call type is related to body return type in borrowck)
 - #144924 (compiletest: add hint for when a ui test produces no errors)

r? `@ghost`
`@rustbot` modify labels: rollup
Zalathar added a commit to Zalathar/rust that referenced this pull request Aug 7, 2025
…r=Kobzol

bootstrap: refactor mingw dist and fix gnullvm

Fixes rust-lang#144533

The first two commits are NFC and only clean up the code, paving the way for the third commit. That said, I think they are worthwhile even without that fix - reusing the same function for two different outcomes was confusing.

The third commit is the fix for rust-lang#144533, but due to the cross-compilation dance it requires a workaround to find the DLL since that logic really was meant only for Windows builders. That workaround is short-lived and will be removed as soon as gnullvm bootstraps itself.
Zalathar added a commit to Zalathar/rust that referenced this pull request Aug 7, 2025
…r=Kobzol

bootstrap: refactor mingw dist and fix gnullvm

Fixes rust-lang#144533

The first two commits are NFC and only clean up the code, paving the way for the third commit. That said, I think they are worthwhile even without that fix - reusing the same function for two different outcomes was confusing.

The third commit is the fix for rust-lang#144533, but due to the cross-compilation dance it requires a workaround to find the DLL since that logic really was meant only for Windows builders. That workaround is short-lived and will be removed as soon as gnullvm bootstraps itself.
@Zalathar
Copy link
Contributor

Zalathar commented Aug 7, 2025

Still trying to track down #144995 (comment)

@bors try jobs=dist-ohos-x86_64

rust-bors bot added a commit that referenced this pull request Aug 7, 2025
bootstrap: refactor mingw dist and fix gnullvm

try-job: dist-ohos-x86_64
@rust-bors
Copy link

rust-bors bot commented Aug 7, 2025

⌛ Trying commit d2e3ea9 with merge e266e6f

To cancel the try build, run the command @bors try cancel.

Zalathar added a commit to Zalathar/rust that referenced this pull request Aug 7, 2025
…r=Kobzol

bootstrap: refactor mingw dist and fix gnullvm

Fixes rust-lang#144533

The first two commits are NFC and only clean up the code, paving the way for the third commit. That said, I think they are worthwhile even without that fix - reusing the same function for two different outcomes was confusing.

The third commit is the fix for rust-lang#144533, but due to the cross-compilation dance it requires a workaround to find the DLL since that logic really was meant only for Windows builders. That workaround is short-lived and will be removed as soon as gnullvm bootstraps itself.
@rust-bors
Copy link

rust-bors bot commented Aug 7, 2025

☀️ Try build successful (CI)
Build commit: e266e6f (e266e6fe3d99fc5e76e65f2d881b53eb7b08d15f, parent: 6bcdcc73bd11568fd85f5a38b58e1eda054ad1cd)

bors added a commit that referenced this pull request Aug 7, 2025
Rollup of 20 pull requests

Successful merges:

 - #137831 (Tweak auto trait errors)
 - #143028 (emit `StorageLive` and schedule `StorageDead` for `let`-`else`'s bindings after matching)
 - #143764 (lower pattern bindings in the order they're written and base drop order on primary bindings' order)
 - #143808 (Port `#[should_panic]` to the new attribute parsing infrastructure )
 - #143906 (Miri: non-deterministic floating point operations in `foreign_items`)
 - #143929 (Mark all deprecation lints in name resolution as deny-by-default and report-in-deps)
 - #144133 (Stabilize const TypeId::of)
 - #144439 (Introduce ModernIdent type to unify macro 2.0 hygiene handling)
 - #144473 (Address libunwind.a inconsistency issues in the bootstrap program)
 - #144659 (bootstrap: refactor mingw dist and fix gnullvm)
 - #144705 (compiler-builtins: plumb LSE support for aarch64 on linux/gnu when optimized-compiler-builtins not enabled)
 - #144807 (Streamline config in bootstrap)
 - #144900 (Stabilize `unsigned_signed_diff` feature)
 - #144903 (Rename `begin_panic_handler` to `panic_handler`)
 - #144931 ([win][arm64ec] Fix msvc-wholearchive for Arm64EC)
 - #144974 (compiler-builtins subtree update)
 - #144997 (bump bootstrap compiler to 1.90 beta)
 - #145004 (Couple of minor cleanups)
 - #145009 (A couple small changes for rust-analyzer next-solver work)
 - #145014 (Revert "Preserve the .debug_gdb_scripts section")

r? `@ghost`
`@rustbot` modify labels: rollup
bors added a commit that referenced this pull request Aug 7, 2025
Rollup of 19 pull requests

Successful merges:

 - #137831 (Tweak auto trait errors)
 - #138689 (add nvptx_target_feature)
 - #140267 (implement continue_ok and break_ok for ControlFlow)
 - #143028 (emit `StorageLive` and schedule `StorageDead` for `let`-`else`'s bindings after matching)
 - #143764 (lower pattern bindings in the order they're written and base drop order on primary bindings' order)
 - #143808 (Port `#[should_panic]` to the new attribute parsing infrastructure )
 - #143906 (Miri: non-deterministic floating point operations in `foreign_items`)
 - #143929 (Mark all deprecation lints in name resolution as deny-by-default and report-in-deps)
 - #144133 (Stabilize const TypeId::of)
 - #144369 (Upgrade semicolon_in_expressions_from_macros from warn to deny)
 - #144439 (Introduce ModernIdent type to unify macro 2.0 hygiene handling)
 - #144473 (Address libunwind.a inconsistency issues in the bootstrap program)
 - #144601 (Allow `cargo fix` to partially apply `mismatched_lifetime_syntaxes`)
 - #144650 (Additional tce tests)
 - #144659 (bootstrap: refactor mingw dist and fix gnullvm)
 - #144682 (Stabilize `strict_overflow_ops`)
 - #145026 (Update books)
 - #145033 (Reimplement `print_region` in `type_name.rs`.)
 - #145040 (rustc-dev-guide subtree update)

Failed merges:

 - #143857 (Port #[macro_export] to the new attribute parsing infrastructure)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 27ab088 into rust-lang:master Aug 7, 2025
11 checks passed
@rustbot rustbot added this to the 1.91.0 milestone Aug 7, 2025
rust-timer added a commit that referenced this pull request Aug 7, 2025
Rollup merge of #144659 - mati865:gnullvm-vendor-libunwind, r=Kobzol

bootstrap: refactor mingw dist and fix gnullvm

Fixes #144533

The first two commits are NFC and only clean up the code, paving the way for the third commit. That said, I think they are worthwhile even without that fix - reusing the same function for two different outcomes was confusing.

The third commit is the fix for #144533, but due to the cross-compilation dance it requires a workaround to find the DLL since that logic really was meant only for Windows builders. That workaround is short-lived and will be removed as soon as gnullvm bootstraps itself.
github-actions bot pushed a commit to rust-lang/miri that referenced this pull request Aug 8, 2025
Rollup of 19 pull requests

Successful merges:

 - rust-lang/rust#137831 (Tweak auto trait errors)
 - rust-lang/rust#138689 (add nvptx_target_feature)
 - rust-lang/rust#140267 (implement continue_ok and break_ok for ControlFlow)
 - rust-lang/rust#143028 (emit `StorageLive` and schedule `StorageDead` for `let`-`else`'s bindings after matching)
 - rust-lang/rust#143764 (lower pattern bindings in the order they're written and base drop order on primary bindings' order)
 - rust-lang/rust#143808 (Port `#[should_panic]` to the new attribute parsing infrastructure )
 - rust-lang/rust#143906 (Miri: non-deterministic floating point operations in `foreign_items`)
 - rust-lang/rust#143929 (Mark all deprecation lints in name resolution as deny-by-default and report-in-deps)
 - rust-lang/rust#144133 (Stabilize const TypeId::of)
 - rust-lang/rust#144369 (Upgrade semicolon_in_expressions_from_macros from warn to deny)
 - rust-lang/rust#144439 (Introduce ModernIdent type to unify macro 2.0 hygiene handling)
 - rust-lang/rust#144473 (Address libunwind.a inconsistency issues in the bootstrap program)
 - rust-lang/rust#144601 (Allow `cargo fix` to partially apply `mismatched_lifetime_syntaxes`)
 - rust-lang/rust#144650 (Additional tce tests)
 - rust-lang/rust#144659 (bootstrap: refactor mingw dist and fix gnullvm)
 - rust-lang/rust#144682 (Stabilize `strict_overflow_ops`)
 - rust-lang/rust#145026 (Update books)
 - rust-lang/rust#145033 (Reimplement `print_region` in `type_name.rs`.)
 - rust-lang/rust#145040 (rustc-dev-guide subtree update)

Failed merges:

 - rust-lang/rust#143857 (Port #[macro_export] to the new attribute parsing infrastructure)

r? `@ghost`
`@rustbot` modify labels: rollup
@mati865 mati865 deleted the gnullvm-vendor-libunwind branch August 9, 2025 12:35
@mati865
Copy link
Member Author

mati865 commented Aug 9, 2025

Nominating for the backport to beta, @rustbot modify labels: +beta-nominated

This fixes the issue with gnullvm host toolchain failing to start when the user doesn't add libunwind.dll to their PATH environment variable. Depending on the setup, it might be a natural thing (first dot) to do or not so much (the other two):

  • When C toolchain puts libunwind.dll next to the Clang binary, like in MSYS2 case, adding Clang to PATH also adds the library.
  • When C toolchain uses wrappers as the "entry points" it might put both Clang and the library into a different directory. This can be seen in llvm-mingw which is probably the best known LLVM based mingw-w64 toolchain. In this case, the user typically adds only the wrappers to PATH.
  • Regardless of the toolchain, if the user doesn't modify PATH but configures the linker via Cargo config or other environment variables

I can see the following ways to improve this situation:

  • Backport this PR - this fully fixes the problem, but since this PR refactors code used by Tier 1 windows-gnu target, this might be deemed too risky.
  • Create smaller version of this PR only for the beta - also fixes the problem but is probably even less feasible.
  • Update release notes with the workaround - basically mention the bug and tell how to work around it.
  • Drop gnullvm hosts from beta (and future stable) - delay the "release" of these host toolchains by one release, proposed in the issue

This proposal is the first option. I think it'd be the least problematic, but I'm open to all options (mentioned above or not).

@rustbot rustbot added the beta-nominated Nominated for backporting to the compiler in the beta channel. label Aug 9, 2025
github-actions bot pushed a commit to rust-lang/rust-analyzer that referenced this pull request Aug 11, 2025
Rollup of 19 pull requests

Successful merges:

 - rust-lang/rust#137831 (Tweak auto trait errors)
 - rust-lang/rust#138689 (add nvptx_target_feature)
 - rust-lang/rust#140267 (implement continue_ok and break_ok for ControlFlow)
 - rust-lang/rust#143028 (emit `StorageLive` and schedule `StorageDead` for `let`-`else`'s bindings after matching)
 - rust-lang/rust#143764 (lower pattern bindings in the order they're written and base drop order on primary bindings' order)
 - rust-lang/rust#143808 (Port `#[should_panic]` to the new attribute parsing infrastructure )
 - rust-lang/rust#143906 (Miri: non-deterministic floating point operations in `foreign_items`)
 - rust-lang/rust#143929 (Mark all deprecation lints in name resolution as deny-by-default and report-in-deps)
 - rust-lang/rust#144133 (Stabilize const TypeId::of)
 - rust-lang/rust#144369 (Upgrade semicolon_in_expressions_from_macros from warn to deny)
 - rust-lang/rust#144439 (Introduce ModernIdent type to unify macro 2.0 hygiene handling)
 - rust-lang/rust#144473 (Address libunwind.a inconsistency issues in the bootstrap program)
 - rust-lang/rust#144601 (Allow `cargo fix` to partially apply `mismatched_lifetime_syntaxes`)
 - rust-lang/rust#144650 (Additional tce tests)
 - rust-lang/rust#144659 (bootstrap: refactor mingw dist and fix gnullvm)
 - rust-lang/rust#144682 (Stabilize `strict_overflow_ops`)
 - rust-lang/rust#145026 (Update books)
 - rust-lang/rust#145033 (Reimplement `print_region` in `type_name.rs`.)
 - rust-lang/rust#145040 (rustc-dev-guide subtree update)

Failed merges:

 - rust-lang/rust#143857 (Port #[macro_export] to the new attribute parsing infrastructure)

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
beta-nominated Nominated for backporting to the compiler in the beta channel. 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)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

{aarch64,x86_64}-pc-windows-gnullvm host tools are missing libunwind.dll
7 participants