Skip to content

Commit

Permalink
Auto merge of rust-lang#93047 - matthiaskrgr:defer__dist_PlainSourceT…
Browse files Browse the repository at this point in the history
…arball, r=Mark-Simulacrum

build: dist: defer PlainSourceTarball

Apparently it changes some tool sources and invalidates their fingerprints, forcing us to build them several times (before and after vendoring sources).
I have not dug into why vendoring actually invalidates the figreprints, but moving the vendoring lower in the pipeline seems to avoid the issue.
I could imagine that we somehow write a .cargo/config somewhere which somehow makes subsequent builds use the vendored deps but I was not able to find anything.

I checked the sizes of generated archives pre and post patch and their are the same, so I hope there is no functional change.

Fixes rust-lang#93033
  • Loading branch information
bors committed Jan 23, 2022
2 parents 16c1a9d + 5f58a78 commit 1e40679
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/bootstrap/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -588,7 +588,6 @@ impl<'a> Builder<'a> {
dist::RustcDev,
dist::Analysis,
dist::Src,
dist::PlainSourceTarball,
dist::Cargo,
dist::Rls,
dist::RustAnalyzer,
Expand All @@ -599,6 +598,11 @@ impl<'a> Builder<'a> {
dist::LlvmTools,
dist::RustDev,
dist::Extended,
// It seems that PlainSourceTarball somehow changes how some of the tools
// perceive their dependencies (see #93033) which would invaliate fingerprints
// and force us to rebuild tools after vendoring dependencies.
// To work around this, create the Tarball after building all the tools.
dist::PlainSourceTarball,
dist::BuildManifest,
dist::ReproducibleArtifacts,
),
Expand Down

0 comments on commit 1e40679

Please sign in to comment.