diff --git a/src/bootstrap/src/core/sanity.rs b/src/bootstrap/src/core/sanity.rs index d330ebb9102a0..d78bac326525c 100644 --- a/src/bootstrap/src/core/sanity.rs +++ b/src/bootstrap/src/core/sanity.rs @@ -96,6 +96,10 @@ pub fn check(build: &mut Build) { path.components().any(|component| skipped_paths.contains(&component.as_os_str())) }); + // Skip target sanity checks when doing a local rebuild as in that case stage0 + // likely knows about our new targets. + skip_target_sanity |= build.config.local_rebuild; + let path = env::var_os("PATH").unwrap_or_default(); // On Windows, quotes are invalid characters for filename paths, and if // one is present as part of the PATH then that can lead to the system