about summary refs log tree commit diff
path: root/src/bootstrap
diff options
context:
space:
mode:
authorTim Neumann <timnn@google.com>2024-02-10 20:20:16 +0100
committerTim Neumann <timnn@google.com>2024-02-10 22:42:22 +0100
commitfd470e58c2282755bc6cbd5ef318577d2eb10322 (patch)
tree0aeaabf27c41fae115f0a1b9fb3b5c209c42d285 /src/bootstrap
parent5f40394baa07b6fb50bc70dedd8b780524b20934 (diff)
Adapt `llvm-has-rust-patches` validation to take `llvm-config` into account.
Diffstat (limited to 'src/bootstrap')
-rw-r--r--src/bootstrap/src/core/config/config.rs7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/bootstrap/src/core/config/config.rs b/src/bootstrap/src/core/config/config.rs
index c0dd1e12084..4c64850c0e0 100644
--- a/src/bootstrap/src/core/config/config.rs
+++ b/src/bootstrap/src/core/config/config.rs
@@ -1810,10 +1810,9 @@ impl Config {
                     target.llvm_config = Some(config.src.join(s));
                 }
                 if let Some(patches) = cfg.llvm_has_rust_patches {
-                    assert_eq!(
-                        config.submodules,
-                        Some(false),
-                        "cannot set `llvm-has-rust-patches` for a managed submodule (set `build.submodules = false` if you want to apply patches)"
+                    assert!(
+                        config.submodules == Some(false) || cfg.llvm_config.is_some(),
+                        "use of `llvm-has-rust-patches` is restricted to cases where either submodules are disabled or llvm-config been provided"
                     );
                     target.llvm_has_rust_patches = Some(patches);
                 }