Skip to content

Commit 4e99b68

Browse files
committed
Trim MSVC output even if it doesn't start with whitespace
I copied this from Chromium and I think Chromium was just wrong.
1 parent ad72d55 commit 4e99b68

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

  • compiler/rustc_codegen_ssa/src/back

compiler/rustc_codegen_ssa/src/back/link.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -729,9 +729,10 @@ fn report_linker_output(sess: &Session, levels: CodegenLintLevels, stdout: &[u8]
729729
escaped_stdout = for_each(&stdout, |line, output| {
730730
// Hide some progress messages from link.exe that we don't care about.
731731
// See https://github.com/chromium/chromium/blob/bfa41e41145ffc85f041384280caf2949bb7bd72/build/toolchain/win/tool_wrapper.py#L144-L146
732-
if line.starts_with(" Creating library")
733-
|| line.starts_with("Generating code")
734-
|| line.starts_with("Finished generating code")
732+
let trimmed = line.trim_start();
733+
if trimmed.starts_with("Creating library")
734+
|| trimmed.starts_with("Generating code")
735+
|| trimmed.starts_with("Finished generating code")
735736
{
736737
linker_info += line;
737738
linker_info += "\r\n";

0 commit comments

Comments
 (0)