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)); }