Skip to content

Commit eee9e60

Browse files
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.
2 parents 77d7a2c + 23946b7 commit eee9e60

File tree

1 file changed

+2
-0
lines changed
  • src/bootstrap/src/core/build_steps

1 file changed

+2
-0
lines changed

src/bootstrap/src/core/build_steps/tool.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -857,7 +857,9 @@ impl Step for Cargo {
857857
fn run(self, builder: &Builder<'_>) -> ToolBuildResult {
858858
builder.build.require_submodule("src/tools/cargo", None);
859859

860+
builder.std(self.build_compiler, builder.host_target);
860861
builder.std(self.build_compiler, self.target);
862+
861863
builder.ensure(ToolBuild {
862864
build_compiler: self.build_compiler,
863865
target: self.target,

0 commit comments

Comments
 (0)