Skip to content

Commit a7b9488

Browse files
authored
Rollup merge of #108619 - jyn514:llvm-version-check, r=cuviper
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. r? ``@cuviper`` on whether we want to do this or not, since you maintain rust on Fedora and touched this config last.
2 parents 0a3b557 + 8becfed commit a7b9488

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
@@ -75,11 +75,6 @@ changelog-seen = 2
7575
# or alternatively ...
7676
#ccache = "/path/to/ccache"
7777

78-
# If an external LLVM root is specified, we automatically check the version by
79-
# default to make sure it's within the range that we're expecting, but setting
80-
# this flag will indicate that this version check should not be done.
81-
#version-check = true
82-
8378
# When true, link libstdc++ statically into the rustc_llvm.
8479
# This is useful if you don't want to use the dynamic version of that
8580
# 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
@@ -118,7 +118,6 @@ pub struct Config {
118118
pub llvm_optimize: bool,
119119
pub llvm_thin_lto: bool,
120120
pub llvm_release_debuginfo: bool,
121-
pub llvm_version_check: bool,
122121
pub llvm_static_stdcpp: bool,
123122
/// `None` if `llvm_from_ci` is true and we haven't yet downloaded llvm.
124123
#[cfg(not(test))]
@@ -672,7 +671,6 @@ define_config! {
672671
tests: Option<bool> = "tests",
673672
plugins: Option<bool> = "plugins",
674673
ccache: Option<StringOrBool> = "ccache",
675-
version_check: Option<bool> = "version-check",
676674
static_libstdcpp: Option<bool> = "static-libstdcpp",
677675
ninja: Option<bool> = "ninja",
678676
targets: Option<String> = "targets",
@@ -804,7 +802,6 @@ impl Config {
804802
let mut config = Config::default();
805803
config.llvm_optimize = true;
806804
config.ninja_in_file = true;
807-
config.llvm_version_check = true;
808805
config.llvm_static_stdcpp = false;
809806
config.backtrace = true;
810807
config.rust_optimize = true;
@@ -1166,7 +1163,6 @@ impl Config {
11661163
set(&mut config.llvm_optimize, llvm.optimize);
11671164
set(&mut config.llvm_thin_lto, llvm.thin_lto);
11681165
set(&mut config.llvm_release_debuginfo, llvm.release_debuginfo);
1169-
set(&mut config.llvm_version_check, llvm.version_check);
11701166
set(&mut config.llvm_static_stdcpp, llvm.static_libstdcpp);
11711167
if let Some(v) = llvm.link_shared {
11721168
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
@@ -520,10 +520,6 @@ impl Step for Llvm {
520520
}
521521

522522
fn check_llvm_version(builder: &Builder<'_>, llvm_config: &Path) {
523-
if !builder.config.llvm_version_check {
524-
return;
525-
}
526-
527523
if builder.config.dry_run() {
528524
return;
529525
}

0 commit comments

Comments
 (0)