Skip to content

Commit

Permalink
build: dist: defer PlainSourceTarball
Browse files Browse the repository at this point in the history
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 the 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 not functional change.

Fixes rust-lang#93033
  • Loading branch information
matthiaskrgr committed Jan 19, 2022
1 parent 7531d2f commit 5f58a78
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 @@ -495,7 +495,6 @@ impl<'a> Builder<'a> {
dist::RustcDev,
dist::Analysis,
dist::Src,
dist::PlainSourceTarball,
dist::Cargo,
dist::Rls,
dist::RustAnalyzer,
Expand All @@ -506,6 +505,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 5f58a78

Please sign in to comment.