Skip to content

Commit

Permalink
normalize away -Wlinker-messages wrappers from rust-lld rmake test
Browse files Browse the repository at this point in the history
  • Loading branch information
lqd committed Mar 5, 2025
1 parent ac951d3 commit 36efaf8
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions tests/run-make/rust-lld/rmake.rs
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,8 @@ fn main() {
}

fn find_lld_version_in_logs(stderr: String) -> bool {
let lld_version_re =
Regex::new(r"^warning: linker std(out|err): LLD [0-9]+\.[0-9]+\.[0-9]+").unwrap();
// Strip the `-Wlinker-messages` wrappers prefixing the linker output.
let stderr = Regex::new(r"warning: linker std(out|err):").unwrap().replace_all(&stderr, "");
let lld_version_re = Regex::new(r"^LLD [0-9]+\.[0-9]+\.[0-9]+").unwrap();
stderr.lines().any(|line| lld_version_re.is_match(line.trim()))
}

0 comments on commit 36efaf8

Please sign in to comment.