Auto merge of #70882 - tmiasko:llvm-version-suffix, r=Mark-Simulacrum

Make LLVM version suffix independent of rustc version on dev channel

Remove rustc version from LLVM version suffix on dev channel,
avoiding the need for full rebuilds when switching between
branches with different LLVM submodule & rustc version.

Note: To avoid full rebuild, on subsequent LLVM submodule update, copy the
current value of `LLVM_VERSION_SUFFIX` from `build/*/llvm/build/CMakeCache.txt`,
to `version-suffix` in `config.toml`.
This commit is contained in:
bors 2020-04-13 07:34:11 +00:00
commit d28a46444e
2 changed files with 10 additions and 5 deletions

View file

@ -235,10 +235,14 @@ impl Step for Llvm {
if !suffix.is_empty() {
cfg.define("LLVM_VERSION_SUFFIX", suffix);
}
} else if builder.config.channel == "dev" {
// Changes to a version suffix require a complete rebuild of the LLVM.
// To avoid rebuilds during a time of version bump, don't include rustc
// release number on the dev channel.
cfg.define("LLVM_VERSION_SUFFIX", "-rust-dev");
} else {
let default_suffix =
format!("-rust-{}-{}", channel::CFG_RELEASE_NUM, builder.config.channel);
cfg.define("LLVM_VERSION_SUFFIX", default_suffix);
let suffix = format!("-rust-{}-{}", channel::CFG_RELEASE_NUM, builder.config.channel);
cfg.define("LLVM_VERSION_SUFFIX", suffix);
}
if let Some(ref linker) = builder.config.llvm_use_linker {