Skip to content

Commit ef032c7

Browse files
committed
change emit condition
Signed-off-by: xizheyin <[email protected]>
1 parent e7d4f43 commit ef032c7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

compiler/rustc_codegen_ssa/src/errors.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -457,7 +457,7 @@ impl<G: EmissionGuarantee> Diagnostic<'_, G> for LinkingFailed<'_> {
457457
diag.note("some arguments are omitted. use `--verbose` to show all linker arguments");
458458
}
459459

460-
diag.note(self.escaped_output);
460+
diag.note(self.escaped_output.clone());
461461

462462
// Trying to match an error from OS linkers
463463
// which by now we have no way to translate.
@@ -469,7 +469,7 @@ impl<G: EmissionGuarantee> Diagnostic<'_, G> for LinkingFailed<'_> {
469469
diag.note(fluent::codegen_ssa_use_cargo_directive);
470470
}
471471
}
472-
if self.linker_path.display().to_string().contains("cc") {
472+
if self.escaped_output.contains("unable to find library -lLLVM-") {
473473
diag.help("consider adding the llvm-tools component to your rustup installation");
474474
}
475475
diag

0 commit comments

Comments
 (0)