bootstrap: Detect musl hosts by Gelbpunkt · Pull Request #144092 · rust-lang/rust

@rustbot rustbot added S-waiting-on-review

Status: Awaiting review from the assignee but also interested parties.

T-bootstrap

Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)

labels

Jul 17, 2025

@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

Jul 18, 2025

@bors bors added S-waiting-on-author

Status: This is awaiting some action (such as code changes or more information) from the author.

and removed S-waiting-on-bors

Status: Waiting on bors to run and complete tests. Bors will change the label on completion.

labels

Jul 18, 2025

@Gelbpunkt

Currently, all non-Android Linux hosts are assumed to be using glibc.
This obviously isn't very portable and will currently result in
downloading a stage0 toolchain for glibc even on musl hosts.

There are multiple ways to detect musl somewhat reliably, but the
easiest option is to check for the python SOABI config variable, which
has values like "cpython-313-x86_64-linux-gnu" or
"cpython-313-powerpc64-linux-musl".

Signed-off-by: Jens Reidel <adrian@travitia.xyz>

@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 18, 2025

@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

Jul 18, 2025

bors added a commit that referenced this pull request

Jul 19, 2025
Rollup of 10 pull requests

Successful merges:

 - #141076 (fix Zip unsoundness (again))
 - #142444 (adding run-make test to autodiff)
 - #143704 (Be a bit more careful around exotic cycles in in the inliner)
 - #144073 (Don't test panic=unwind in panic_main.rs on Fuchsia)
 - #144083 (miri sleep tests: increase slack)
 - #144092 (bootstrap: Detect musl hosts)
 - #144098 (Do not lint private-in-public for RPITIT)
 - #144103 (Rename `emit_unless` to `emit_unless_delay`)
 - #144108 (Ignore tests/run-make/link-eh-frame-terminator/rmake.rs when cross-compiling)
 - #144115 (fix outdated comment)

r? `@ghost`
`@rustbot` modify labels: rollup

rust-timer added a commit that referenced this pull request

Jul 19, 2025
Rollup merge of #144092 - Gelbpunkt:musl-stage0, r=Kobzol

bootstrap: Detect musl hosts

Currently, all non-Android Linux hosts are assumed to be using glibc. This obviously isn't very portable and will currently result in downloading a stage0 toolchain for glibc even on musl hosts.

There are multiple ways to detect musl somewhat reliably, but the easiest option is to check for the python target, which is exposed in `sys.implementation._multiarch` and has values like "x86_64-linux-gnu" or "powerpc64le-linux-musl".

github-actions bot pushed a commit to rust-lang/miri that referenced this pull request

Jul 20, 2025

Muscraft pushed a commit to Muscraft/rust that referenced this pull request

Jul 21, 2025
bootstrap: Detect musl hosts

Currently, all non-Android Linux hosts are assumed to be using glibc. This obviously isn't very portable and will currently result in downloading a stage0 toolchain for glibc even on musl hosts.

There are multiple ways to detect musl somewhat reliably, but the easiest option is to check for the python target, which is exposed in `sys.implementation._multiarch` and has values like "x86_64-linux-gnu" or "powerpc64le-linux-musl".

Muscraft pushed a commit to Muscraft/rust that referenced this pull request

Jul 21, 2025

github-actions bot pushed a commit to model-checking/verify-rust-std that referenced this pull request

Jul 29, 2025