Trim MSVC output even if it doesn't start with whitespace

I copied this from Chromium and I think Chromium was just wrong.
This commit is contained in:
Jynn Nelson
2026-04-30 07:49:37 +02:00
parent ad72d55680
commit 4e99b682ce
+4 -3
View File
@@ -729,9 +729,10 @@ fn for_each(bytes: &[u8], mut f: impl FnMut(&str, &mut String)) -> String {
escaped_stdout = for_each(&stdout, |line, output| {
// Hide some progress messages from link.exe that we don't care about.
// See https://github.com/chromium/chromium/blob/bfa41e41145ffc85f041384280caf2949bb7bd72/build/toolchain/win/tool_wrapper.py#L144-L146
if line.starts_with(" Creating library")
|| line.starts_with("Generating code")
|| line.starts_with("Finished generating code")
let trimmed = line.trim_start();
if trimmed.starts_with("Creating library")
|| trimmed.starts_with("Generating code")
|| trimmed.starts_with("Finished generating code")
{
linker_info += line;
linker_info += "\r\n";