Skip to content

Make LLVM version suffix independent of rustc version on dev channel #70882

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 13, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions config.toml.example
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,9 @@
#link-shared = false

# When building llvm, this configures what is being appended to the version.
# If absent, we let the version as-is.
#version-suffix = "-rust"
# The default is "-rust-$version-$channel", except for dev channel where rustc
# version number is omitted. To use LLVM version as is, provide an empty string.
#version-suffix = "-rust-dev"

# On MSVC you can compile LLVM with clang-cl, but the test suite doesn't pass
# with clang-cl, so this is special in that it only compiles LLVM with clang-cl
Expand Down
10 changes: 7 additions & 3 deletions src/bootstrap/native.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down