emit an error if we can't find a path to the self-contained linker

This commit is contained in:
Rémy Rakic
2024-05-21 18:17:05 +00:00
parent fab28f2a4d
commit d64a8bd1e5
3 changed files with 9 additions and 3 deletions

View File

@@ -3127,9 +3127,9 @@ fn add_lld_args(
});
}
if !linker_path_exists {
// As an additional sanity check, we do nothing if the sysroot doesn't contain the
// linker path at all.
return;
// As a sanity check, we emit an error if none of these paths exist: we want
// self-contained linking and have no linker.
sess.dcx().emit_fatal(errors::SelfContainedLinkerMissing);
}
}