From 7945458588a3f9c2bf048ac529be3f94a2afb7db Mon Sep 17 00:00:00 2001 From: Joshua Nelson Date: Thu, 24 Nov 2022 19:27:05 -0500 Subject: [PATCH] `has-rust-patches` doesn't make sense to set for managed submodules --- src/bootstrap/config.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/bootstrap/config.rs b/src/bootstrap/config.rs index 133a66ff5cdf4..94a48a79b0939 100644 --- a/src/bootstrap/config.rs +++ b/src/bootstrap/config.rs @@ -1228,7 +1228,10 @@ impl Config { if let Some(ref s) = cfg.llvm_config { target.llvm_config = Some(config.src.join(s)); } - target.llvm_has_rust_patches = cfg.llvm_has_rust_patches; + if let Some(patches) = cfg.llvm_has_rust_patches { + assert!(config.submodules.is_some(), "cannot set `llvm-hash-rust-patches` for a managed submodule"); + target.llvm_has_rust_patches = Some(patches); + } if let Some(ref s) = cfg.llvm_filecheck { target.llvm_filecheck = Some(config.src.join(s)); }