Skip to content

Commit 8becfed

Browse files
committed
Remove the option to disable llvm-version-check
We don't support old versions of LLVM; there's no reason to have an easy way to force bootstrap to use them anyway. If someone really needs to use an unsupported version, they can modify bootstrap to change the version range.
1 parent 5423745 commit 8becfed

File tree

5 files changed

+1
-14
lines changed

5 files changed

+1
-14
lines changed

config.toml.example

-5
Original file line numberDiff line numberDiff line change
@@ -81,11 +81,6 @@ changelog-seen = 2
8181
# or alternatively ...
8282
#ccache = "/path/to/ccache"
8383

84-
# If an external LLVM root is specified, we automatically check the version by
85-
# default to make sure it's within the range that we're expecting, but setting
86-
# this flag will indicate that this version check should not be done.
87-
#version-check = true
88-
8984
# When true, link libstdc++ statically into the rustc_llvm.
9085
# This is useful if you don't want to use the dynamic version of that
9186
# library provided by LLVM.

src/bootstrap/CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
1616
- `remote-test-server`'s `verbose` argument has been removed in favor of the `--verbose` flag
1717
- `remote-test-server`'s `remote` argument has been removed in favor of the `--bind` flag. Use `--bind 0.0.0.0:12345` to replicate the behavior of the `remote` argument.
1818
- `x.py fmt` now formats only files modified between the merge-base of HEAD and the last commit in the master branch of the rust-lang repository and the current working directory. To restore old behaviour, use `x.py fmt .`. The check mode is not affected by this change. [#105702](https://github.com/rust-lang/rust/pull/105702)
19+
- The `llvm.version-check` config option has been removed. Older versions were never supported. If you still need to support older versions (e.g. you are applying custom patches), patch `check_llvm_version` in bootstrap to change the minimum version. [#108619](https://github.com/rust-lang/rust/pull/108619)
1920

2021
### Non-breaking changes
2122

src/bootstrap/config.rs

-4
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,6 @@ pub struct Config {
119119
pub llvm_optimize: bool,
120120
pub llvm_thin_lto: bool,
121121
pub llvm_release_debuginfo: bool,
122-
pub llvm_version_check: bool,
123122
pub llvm_static_stdcpp: bool,
124123
/// `None` if `llvm_from_ci` is true and we haven't yet downloaded llvm.
125124
#[cfg(not(test))]
@@ -674,7 +673,6 @@ define_config! {
674673
tests: Option<bool> = "tests",
675674
plugins: Option<bool> = "plugins",
676675
ccache: Option<StringOrBool> = "ccache",
677-
version_check: Option<bool> = "version-check",
678676
static_libstdcpp: Option<bool> = "static-libstdcpp",
679677
ninja: Option<bool> = "ninja",
680678
targets: Option<String> = "targets",
@@ -806,7 +804,6 @@ impl Config {
806804
let mut config = Config::default();
807805
config.llvm_optimize = true;
808806
config.ninja_in_file = true;
809-
config.llvm_version_check = true;
810807
config.llvm_static_stdcpp = false;
811808
config.backtrace = true;
812809
config.rust_optimize = true;
@@ -1174,7 +1171,6 @@ impl Config {
11741171
set(&mut config.llvm_optimize, llvm.optimize);
11751172
set(&mut config.llvm_thin_lto, llvm.thin_lto);
11761173
set(&mut config.llvm_release_debuginfo, llvm.release_debuginfo);
1177-
set(&mut config.llvm_version_check, llvm.version_check);
11781174
set(&mut config.llvm_static_stdcpp, llvm.static_libstdcpp);
11791175
if let Some(v) = llvm.link_shared {
11801176
config.llvm_link_shared.set(Some(v));

src/bootstrap/configure.py

-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@ def v(*args):
4444
o("llvm-static-stdcpp", "llvm.static-libstdcpp", "statically link to libstdc++ for LLVM")
4545
o("llvm-link-shared", "llvm.link-shared", "prefer shared linking to LLVM (llvm-config --link-shared)")
4646
o("rpath", "rust.rpath", "build rpaths into rustc itself")
47-
o("llvm-version-check", "llvm.version-check", "check if the LLVM version is supported, build anyway")
4847
o("codegen-tests", "rust.codegen-tests", "run the tests/codegen tests")
4948
o("option-checking", None, "complain about unrecognized options in this configure script")
5049
o("ninja", "llvm.ninja", "build LLVM using the Ninja generator (for MSVC, requires building in the correct environment)")

src/bootstrap/native.rs

-4
Original file line numberDiff line numberDiff line change
@@ -549,10 +549,6 @@ fn get_built_llvm_lib_path(llvm_config_path: &Path) -> PathBuf {
549549
}
550550

551551
fn check_llvm_version(builder: &Builder<'_>, llvm_config: &Path) {
552-
if !builder.config.llvm_version_check {
553-
return;
554-
}
555-
556552
if builder.config.dry_run() {
557553
return;
558554
}

0 commit comments

Comments
 (0)