about summary refs log tree commit diff
diff options
context:
space:
mode:
authorYuki Okushi <jtitor@2k36.org>2023-03-07 23:06:21 +0900
committerGitHub <noreply@github.com>2023-03-07 23:06:21 +0900
commita7b9488599494a0c91ab18a169aaab476a274177 (patch)
treec4b1c9e5bf6bb5fd76d7f1bddcb0c38efab8df25
parent0a3b557d528dd7c8a88ceca6f7dc0699b89a3ef4 (diff)
parent8becfed1c984a7efbba993a64c409d0c403848cd (diff)
downloadrust-a7b9488599494a0c91ab18a169aaab476a274177.tar.gz
rust-a7b9488599494a0c91ab18a169aaab476a274177.zip
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.
-rw-r--r--config.toml.example5
-rw-r--r--src/bootstrap/CHANGELOG.md1
-rw-r--r--src/bootstrap/config.rs4
-rwxr-xr-xsrc/bootstrap/configure.py1
-rw-r--r--src/bootstrap/native.rs4
5 files changed, 1 insertions, 14 deletions
diff --git a/config.toml.example b/config.toml.example
index 267aa8cb548..a12c4e0700c 100644
--- a/config.toml.example
+++ b/config.toml.example
@@ -75,11 +75,6 @@ changelog-seen = 2
 # or alternatively ...
 #ccache = "/path/to/ccache"
 
-# If an external LLVM root is specified, we automatically check the version by
-# default to make sure it's within the range that we're expecting, but setting
-# this flag will indicate that this version check should not be done.
-#version-check = true
-
 # When true, link libstdc++ statically into the rustc_llvm.
 # This is useful if you don't want to use the dynamic version of that
 # library provided by LLVM.
diff --git a/src/bootstrap/CHANGELOG.md b/src/bootstrap/CHANGELOG.md
index 4105fa5ec96..648eb553c78 100644
--- a/src/bootstrap/CHANGELOG.md
+++ b/src/bootstrap/CHANGELOG.md
@@ -16,6 +16,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
 - `remote-test-server`'s `verbose` argument has been removed in favor of the `--verbose` flag
 - `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.
 - `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)
+- 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)
 
 ### Non-breaking changes
 
diff --git a/src/bootstrap/config.rs b/src/bootstrap/config.rs
index bf1aff7b72f..6e64bc20d20 100644
--- a/src/bootstrap/config.rs
+++ b/src/bootstrap/config.rs
@@ -118,7 +118,6 @@ pub struct Config {
     pub llvm_optimize: bool,
     pub llvm_thin_lto: bool,
     pub llvm_release_debuginfo: bool,
-    pub llvm_version_check: bool,
     pub llvm_static_stdcpp: bool,
     /// `None` if `llvm_from_ci` is true and we haven't yet downloaded llvm.
     #[cfg(not(test))]
@@ -672,7 +671,6 @@ define_config! {
         tests: Option<bool> = "tests",
         plugins: Option<bool> = "plugins",
         ccache: Option<StringOrBool> = "ccache",
-        version_check: Option<bool> = "version-check",
         static_libstdcpp: Option<bool> = "static-libstdcpp",
         ninja: Option<bool> = "ninja",
         targets: Option<String> = "targets",
@@ -804,7 +802,6 @@ impl Config {
         let mut config = Config::default();
         config.llvm_optimize = true;
         config.ninja_in_file = true;
-        config.llvm_version_check = true;
         config.llvm_static_stdcpp = false;
         config.backtrace = true;
         config.rust_optimize = true;
@@ -1166,7 +1163,6 @@ impl Config {
             set(&mut config.llvm_optimize, llvm.optimize);
             set(&mut config.llvm_thin_lto, llvm.thin_lto);
             set(&mut config.llvm_release_debuginfo, llvm.release_debuginfo);
-            set(&mut config.llvm_version_check, llvm.version_check);
             set(&mut config.llvm_static_stdcpp, llvm.static_libstdcpp);
             if let Some(v) = llvm.link_shared {
                 config.llvm_link_shared.set(Some(v));
diff --git a/src/bootstrap/configure.py b/src/bootstrap/configure.py
index c0d382d8a50..5278f0c10b3 100755
--- a/src/bootstrap/configure.py
+++ b/src/bootstrap/configure.py
@@ -44,7 +44,6 @@ o("local-rebuild", "build.local-rebuild", "assume local-rust matches the current
 o("llvm-static-stdcpp", "llvm.static-libstdcpp", "statically link to libstdc++ for LLVM")
 o("llvm-link-shared", "llvm.link-shared", "prefer shared linking to LLVM (llvm-config --link-shared)")
 o("rpath", "rust.rpath", "build rpaths into rustc itself")
-o("llvm-version-check", "llvm.version-check", "check if the LLVM version is supported, build anyway")
 o("codegen-tests", "rust.codegen-tests", "run the tests/codegen tests")
 o("option-checking", None, "complain about unrecognized options in this configure script")
 o("ninja", "llvm.ninja", "build LLVM using the Ninja generator (for MSVC, requires building in the correct environment)")
diff --git a/src/bootstrap/native.rs b/src/bootstrap/native.rs
index 8453a25f38a..909e7d83a15 100644
--- a/src/bootstrap/native.rs
+++ b/src/bootstrap/native.rs
@@ -520,10 +520,6 @@ impl Step for Llvm {
 }
 
 fn check_llvm_version(builder: &Builder<'_>, llvm_config: &Path) {
-    if !builder.config.llvm_version_check {
-        return;
-    }
-
     if builder.config.dry_run() {
         return;
     }