Skip to content

Commit cb27faf

Browse files
Make sure CFG_RELEASE_CHANNEL is always set.
Previously we'd build libsyntax without it when documenting and that'd cause us to recompile it when building normally for no reason.
1 parent 3b90551 commit cb27faf

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/bootstrap/builder.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -426,6 +426,7 @@ impl<'a> Builder<'a> {
426426
self.sysroot(compiler)
427427
})
428428
.env("RUSTC_LIBDIR", self.sysroot_libdir(compiler, self.build.build))
429+
.env("CFG_RELEASE_CHANNEL", &self.build.config.channel)
429430
.env("RUSTDOC_REAL", self.rustdoc(compiler));
430431
cmd
431432
}
@@ -574,6 +575,9 @@ impl<'a> Builder<'a> {
574575
// FIXME: should update code to not require this env var
575576
cargo.env("CFG_COMPILER_HOST_TRIPLE", target);
576577

578+
// Set this for all builds to make sure doc builds also get it.
579+
cargo.env("CFG_RELEASE_CHANNEL", &self.build.config.channel);
580+
577581
if self.is_verbose() {
578582
cargo.arg("-v");
579583
}

0 commit comments

Comments
 (0)