Skip to content

Fix Cargo cross-compilation (take two) #145221

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 11, 2025
Merged

Conversation

Kobzol
Copy link
Member

@Kobzol Kobzol commented Aug 10, 2025

In #145083, I fixed the case of manually invoking x dist cargo, but I realized that x install creates the tool::Cargo step through the from_build_frompiler constructor, which doesn't go through get_tool_target_compiler. So we just prepare both the host and target stdlibs directly before building Cargo. Ideally we would get rid of from_build_compiler, but that will require refactoring the dist and test steps, which is upcoming.

Hopefully fixes #145059 for good.

@rustbot
Copy link
Collaborator

rustbot commented Aug 10, 2025

r? @jieyouxu

rustbot has assigned @jieyouxu.
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. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) labels Aug 10, 2025
Copy link
Member

@jieyouxu jieyouxu left a comment

Choose a reason for hiding this comment

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

Oh... right. Thanks

@jieyouxu
Copy link
Member

@bors r+ rollup

@bors
Copy link
Collaborator

bors commented Aug 11, 2025

📌 Commit 23946b7 has been approved by jieyouxu

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 Aug 11, 2025
bors added a commit that referenced this pull request Aug 11, 2025
Rollup of 4 pull requests

Successful merges:

 - #144966 ( Improve suggestion for "missing function argument" on multiline call)
 - #145111 (remove some unused private trait impls)
 - #145221 (Fix Cargo cross-compilation (take two))
 - #145247 (Update `sysinfo` version to `0.37.0`)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit eee9e60 into rust-lang:master Aug 11, 2025
10 checks passed
@rustbot rustbot added this to the 1.91.0 milestone Aug 11, 2025
rust-timer added a commit that referenced this pull request Aug 11, 2025
Rollup merge of #145221 - Kobzol:cargo-dist-fix-2, r=jieyouxu

Fix Cargo cross-compilation (take two)

In #145083, I fixed the case of manually invoking `x dist cargo`, but I realized that `x install` creates the `tool::Cargo` step through the `from_build_frompiler` constructor, which doesn't go through `get_tool_target_compiler`. So we just prepare both the host and target stdlibs directly before building Cargo. Ideally we would get rid of `from_build_compiler`, but that will require refactoring the dist and test steps, which is upcoming.

Hopefully fixes #145059 for good.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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.

nightly cross build started failing 2025-08-06
4 participants