Auto merge of #122205 - onur-ozkan:incorrect-sysroot-for-target, r=albertlarsan68

ensure std is prepared for cross-targets

Previously, doing `x test compiler/*` would result in build failures due to missing std. This PR fixes that.
This commit is contained in:
bors 2024-03-27 22:22:42 +00:00
commit 9d70954948

View File

@ -2605,8 +2605,12 @@ impl Step for Crate {
let mode = self.mode;
// See [field@compile::Std::force_recompile].
builder.ensure(compile::Std::force_recompile(compiler, target));
builder.ensure(RemoteCopyLibs { compiler, target });
builder.ensure(compile::Std::force_recompile(compiler, compiler.host));
if builder.config.build != target {
builder.ensure(compile::Std::force_recompile(compiler, target));
builder.ensure(RemoteCopyLibs { compiler, target });
}
// If we're not doing a full bootstrap but we're testing a stage2
// version of libstd, then what we're actually testing is the libstd