Skip to content

Commit 5f58a78

Browse files
committed
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 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 #93033
1 parent 7531d2f commit 5f58a78

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/bootstrap/builder.rs

+5-1
Original file line numberDiff line numberDiff line change
@@ -495,7 +495,6 @@ impl<'a> Builder<'a> {
495495
dist::RustcDev,
496496
dist::Analysis,
497497
dist::Src,
498-
dist::PlainSourceTarball,
499498
dist::Cargo,
500499
dist::Rls,
501500
dist::RustAnalyzer,
@@ -506,6 +505,11 @@ impl<'a> Builder<'a> {
506505
dist::LlvmTools,
507506
dist::RustDev,
508507
dist::Extended,
508+
// It seems that PlainSourceTarball somehow changes how some of the tools
509+
// perceive their dependencies (see #93033) which would invaliate fingerprints
510+
// and force us to rebuild tools after vendoring dependencies.
511+
// To work around this, create the Tarball after building all the tools.
512+
dist::PlainSourceTarball,
509513
dist::BuildManifest,
510514
dist::ReproducibleArtifacts,
511515
),

0 commit comments

Comments
 (0)