Rollup merge of #144453 - WaffleLapkin:canonical-build-root, r=jieyouxu

canonicalize build root in `tests/run-make/linker-warning`

r? jieyouxu

This is similar to rust-lang/rust#139823 -- the test fails for me because my build dir is a symlink.
This commit is contained in:
Jacob Pratt 2025-07-26 22:42:38 -04:00 committed by GitHub
commit e04daf98f1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -64,7 +64,9 @@ fn main() {
.normalize(r#"/rustc[^/_-]*/"#, "/rustc/")
.normalize("libpanic_abort", "libpanic_unwind")
.normalize(
regex::escape(run_make_support::build_root().to_str().unwrap()),
regex::escape(
run_make_support::build_root().canonicalize().unwrap().to_str().unwrap(),
),
"/build-root",
)
.normalize(r#""[^"]*\/symbols.o""#, "\"/symbols.o\"")