Skip to content

download-rustc: Fix x test core on MacOS #112382

New issue

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

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

Already on GitHub? # to your account

Merged
merged 1 commit into from
Jun 7, 2023

Conversation

jyn514
Copy link
Member

@jyn514 jyn514 commented Jun 7, 2023

before, this hardcoded .so as the extension for dynamically linked objects, which is incorrect everywhere except linux.

@jyn514 jyn514 added the A-download-rustc Area: The `rust.download-rustc` build option. label Jun 7, 2023
@rustbot
Copy link
Collaborator

rustbot commented Jun 7, 2023

r? @albertlarsan68

(rustbot has picked a reviewer for you, use r? to override)

@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 Jun 7, 2023
let filtered_extensions = [
OsStr::new("rmeta"),
OsStr::new("rlib"),
OsStr::new(std::env::consts::DLL_EXTENSION),
Copy link
Member Author

Choose a reason for hiding this comment

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

technically this will be wrong when cross-compiling, but we don't support that today: https://github.com/rust-lang/rust/blob/50c80eb69e2f99cd431e97f080f38dfbf8bb3d9c/src/bootstrap/compile.rs#L1322-L1325
cc #110411

Copy link
Member

Choose a reason for hiding this comment

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

Either we could list the whole list of extensions (dll, so, <whatever is used on macos>, <whatever is used on other platforms>), or at lease leave a FIXME.

Copy link
Member

Choose a reason for hiding this comment

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

Either way r=me with the choice you make. This could also fix things in Windows IIUC.

Copy link
Member Author

Choose a reason for hiding this comment

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

👍 FIXME sounds good, i'll do that. i don't want to try and support this without testing it, there's a dozen other things in bootstrap that are fundamentally broken when --host doesn't match --build.

Copy link
Member

Choose a reason for hiding this comment

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

I meant that in the list, instead of using the platform-specific constant, using the list of extensions for the platforms that are supported.

Copy link
Member Author

Choose a reason for hiding this comment

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

yeah i just don't think it's worth worrying about i guess - it's broken in so many other ways, and i don't know why you'd even want to use it.

before, this hardcoded `.so` as the extension for dynamically linked objects, which is incorrect
everywhere except linux
@jyn514 jyn514 force-pushed the test-download-rustc-macos branch from 50c80eb to a2ab47f Compare June 7, 2023 11:16
@albertlarsan68
Copy link
Member

Thanks for the PR!
@bors r+ rollup (doesn't affect any CI)

@bors
Copy link
Collaborator

bors commented Jun 7, 2023

📌 Commit a2ab47f has been approved by albertlarsan68

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 Jun 7, 2023
bors added a commit to rust-lang-ci/rust that referenced this pull request Jun 7, 2023
Rollup of 6 pull requests

Successful merges:

 - rust-lang#112076 (Fall back to bidirectional normalizes-to if no subst-relate candidate in alias-relate goal)
 - rust-lang#112122 (Add `-Ztrait-solver=next-coherence`)
 - rust-lang#112251 (rustdoc: convert `if let Some()` that always matches to variable)
 - rust-lang#112345 (fix(expand): prevent infinity loop in macro containing only "///")
 - rust-lang#112359 (Respect `RUST_BACKTRACE` for delayed bugs)
 - rust-lang#112382 (download-rustc: Fix `x test core` on MacOS)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 90c361c into rust-lang:master Jun 7, 2023
@rustbot rustbot added this to the 1.72.0 milestone Jun 7, 2023
@jyn514 jyn514 deleted the test-download-rustc-macos branch June 7, 2023 18:19
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
A-download-rustc Area: The `rust.download-rustc` build option. 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.

4 participants