skip target sanity check when it's a local-rebuild

Running the stage0 target sanity check on the newly built compiler can result
in errors and incorrect assumptions.

Signed-off-by: onur-ozkan <work@onurozkan.dev>
This commit is contained in:
onur-ozkan 2024-09-12 08:31:19 +03:00
parent f827364a95
commit 041b59eb62

View File

@ -233,7 +233,8 @@ pub fn check(build: &mut Build) {
}
// Ignore fake targets that are only used for unit tests in bootstrap.
if cfg!(not(feature = "bootstrap-self-test")) && !skip_target_sanity {
if cfg!(not(feature = "bootstrap-self-test")) && !skip_target_sanity && !build.local_rebuild
{
let mut has_target = false;
let target_str = target.to_string();