Closed as not planned
Description
This was added in 3206400 as a temporary workaround for a CI failure. We're no longer using it, so I don't think we should continue to support the option - people can use llvm.build-config
to define custom CMake flags if they really need to.
I have code for removing this that almost works, but the suggested fix in CHANGELOG.md doesn't actually work because of #108621.
diff --git a/config.toml.example b/config.toml.example
index e9fc119ebb2..418e46f8627 100644
--- a/config.toml.example
+++ b/config.toml.example
@@ -140,9 +140,6 @@ changelog-seen = 2
# The value specified here will be passed as `-DLLVM_USE_LINKER` to CMake.
#use-linker = <none> (path)
-# Whether or not to specify `-DLLVM_TEMPORARILY_ALLOW_OLD_TOOLCHAIN=YES`
-#allow-old-toolchain = false
-
# Whether to include the Polly optimizer.
#polly = false
diff --git a/src/bootstrap/CHANGELOG.md b/src/bootstrap/CHANGELOG.md
index 4105fa5ec96..256e876a745 100644
--- a/src/bootstrap/CHANGELOG.md
+++ b/src/bootstrap/CHANGELOG.md
@@ -9,6 +9,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
- Vendoring is no longer done automatically when building from git sources. To use vendoring, run `cargo vendor` manually, or use the pre-vendored `rustc-src` tarball.
- `llvm-libunwind` now accepts `in-tree` (formerly true), `system` or `no` (formerly false) [#77703](https://github.com/rust-lang/rust/pull/77703)
+- The `llvm.allow-old-toolchain` option has been removed. If you need to enable it, use `llvm.build_config.LLVM_TEMPORARILY_ALLOW_OLD_TOOLCHAIN=YES`.
- The options `infodir`, `localstatedir`, and `gpg-password-file` are no longer allowed in config.toml. Previously, they were ignored without warning. Note that `infodir` and `localstatedir` are still accepted by `./configure`, with a warning. [#82451](https://github.com/rust-lang/rust/pull/82451)
- Change the names for `dist` commands to match the component they generate. [#90684](https://github.com/rust-lang/rust/pull/90684)
- The `build.fast-submodules` option has been removed. Fast submodule checkouts are enabled unconditionally. Automatic submodule handling can still be disabled with `build.submodules = false`.
diff --git a/src/bootstrap/config.rs b/src/bootstrap/config.rs
index 8eef3da1726..b5c3e9ad427 100644
--- a/src/bootstrap/config.rs
+++ b/src/bootstrap/config.rs
@@ -131,7 +131,6 @@ pub struct Config {
pub llvm_link_jobs: Option<u32>,
pub llvm_version_suffix: Option<String>,
pub llvm_use_linker: Option<String>,
- pub llvm_allow_old_toolchain: bool,
pub llvm_polly: bool,
pub llvm_clang: bool,
pub llvm_from_ci: bool,
@@ -686,7 +685,6 @@ struct Llvm {
ldflags: Option<String> = "ldflags",
use_libcxx: Option<bool> = "use-libcxx",
use_linker: Option<String> = "use-linker",
- allow_old_toolchain: Option<bool> = "allow-old-toolchain",
polly: Option<bool> = "polly",
clang: Option<bool> = "clang",
download_ci_llvm: Option<StringOrBool> = "download-ci-llvm",
@@ -1186,7 +1184,6 @@ fn parse_inner<'a>(args: &[String], get_toml: impl 'a + Fn(&Path) -> TomlConfig)
config.llvm_ldflags = llvm.ldflags.clone();
set(&mut config.llvm_use_libcxx, llvm.use_libcxx);
config.llvm_use_linker = llvm.use_linker.clone();
- config.llvm_allow_old_toolchain = llvm.allow_old_toolchain.unwrap_or(false);
config.llvm_polly = llvm.polly.unwrap_or(false);
config.llvm_clang = llvm.clang.unwrap_or(false);
config.llvm_build_config = llvm.build_config.clone().unwrap_or(Default::default());
@@ -1226,7 +1223,6 @@ fn parse_inner<'a>(args: &[String], get_toml: impl 'a + Fn(&Path) -> TomlConfig)
check_ci_llvm!(llvm.ldflags);
check_ci_llvm!(llvm.use_libcxx);
check_ci_llvm!(llvm.use_linker);
- check_ci_llvm!(llvm.allow_old_toolchain);
check_ci_llvm!(llvm.polly);
check_ci_llvm!(llvm.clang);
check_ci_llvm!(llvm.build_config);
diff --git a/src/bootstrap/native.rs b/src/bootstrap/native.rs
index 37f6720150e..7562d55e250 100644
--- a/src/bootstrap/native.rs
+++ b/src/bootstrap/native.rs
@@ -785,10 +785,6 @@ fn configure_llvm(builder: &Builder<'_>, target: TargetSelection, cfg: &mut cmak
if let Some(ref linker) = builder.config.llvm_use_linker {
cfg.define("LLVM_USE_LINKER", linker);
}
-
- if builder.config.llvm_allow_old_toolchain {
- cfg.define("LLVM_TEMPORARILY_ALLOW_OLD_TOOLCHAIN", "YES");
- }
}
// Adapted from https://github.com/alexcrichton/cc-rs/blob/fba7feded71ee4f63cfe885673ead6d7b4f2f454/src/lib.rs#L2347-L2365
Metadata
Metadata
Assignees
Labels
Category: PRs that clean code up or issues documenting cleanup.Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.Call for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion.Status: Blocked on something else such as an RFC or other implementation work.Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)