try to normalize whitespace across platforms otherwise, it will get trimmed if the linker is recognized (and `for_each` is invoked), but not otherwise.
diff --git a/compiler/rustc_codegen_ssa/src/back/link.rs b/compiler/rustc_codegen_ssa/src/back/link.rs index 1e5066b..a5b3df6 100644 --- a/compiler/rustc_codegen_ssa/src/back/link.rs +++ b/compiler/rustc_codegen_ssa/src/back/link.rs
@@ -825,10 +825,10 @@ fn for_each(bytes: &[u8], mut f: impl FnMut(&str, &mut String)) -> String { .strip_prefix("Warning: ") .unwrap_or(&escaped_stderr) .replace(": warning: ", ": "); - lint_msg(format!("linker stderr: {escaped_stderr}")); + lint_msg(format!("linker stderr: {}", escaped_stderr.trim_end())); } if !escaped_stdout.is_empty() { - lint_msg(format!("linker stdout: {}", escaped_stdout)) + lint_msg(format!("linker stdout: {}", escaped_stdout.trim_end())) } if !linker_info.is_empty() { lint_info(linker_info);