about summary refs log tree commit diff
path: root/compiler/rustc_llvm/llvm-wrapper
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2025-08-29 13:13:53 +0000
committerbors <bors@rust-lang.org>2025-08-29 13:13:53 +0000
commitdb3fd4708c3916bbc59b81ff7d3f6e19d11820c7 (patch)
treeeb1814eb90be2e7bb6a9a2c9bccc569fa0e985fd /compiler/rustc_llvm/llvm-wrapper
parent41f2b6b39e7526a28d50ff6918dda6de48add5e4 (diff)
parent6864a5bf42baeb64d23f0b086152a9c2893b5ade (diff)
downloadrust-db3fd4708c3916bbc59b81ff7d3f6e19d11820c7.tar.gz
rust-db3fd4708c3916bbc59b81ff7d3f6e19d11820c7.zip
Auto merge of #145902 - Kobzol:dist-docs-build-compiler, r=jieyouxu
Avoid more rustc rebuilds in cross-compilation scenarios

This is a continuation of https://github.com/rust-lang/rust/pull/145874.

It adds a `compiler_for_std` function, which is a slimmed down version of `compiler_for`, which is much simpler, and designed to be used only for the standard library.

The build, dist and doc steps somtimes work with a stage2 std for a given target. That currently requires building a stage2 host compiler. However, if we uplift the stage1 libstd anyway, that is wasteful, in particular when we are cross-compiling.

The last two commits progressively make the stage 2 host rustc build avoidance more and more aggressive. I think that if we decide that it is fine to ship stage1 libstd everywhere, then it makes sense to go all the way.

When we ship stuff, we always build it with the stage 1 compiler (e.g. we ship stage 2 rustc which is built with stage 1 rustc). Libstd is the only component where stage N is built with the stage N compiler. So I think that shipping stage 1 libstd is "enough", and we could thus optimize what gets built on CI.

r? `@jieyouxu`
Diffstat (limited to 'compiler/rustc_llvm/llvm-wrapper')
0 files changed, 0 insertions, 0 deletions