diff options
Diffstat (limited to 'tests/run-make/rust-lld/rmake.rs')
| -rw-r--r-- | tests/run-make/rust-lld/rmake.rs | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/tests/run-make/rust-lld/rmake.rs b/tests/run-make/rust-lld/rmake.rs index 1f311af1ed5..76b15ab1799 100644 --- a/tests/run-make/rust-lld/rmake.rs +++ b/tests/run-make/rust-lld/rmake.rs @@ -14,7 +14,6 @@ fn main() { // Opt-in to lld and the self-contained linker, to link with rust-lld. We'll check that by // asking the linker to display its version number with a link-arg. let output = rustc() - .env("RUSTC_LOG", "rustc_codegen_ssa::back::link=info") .arg("-Zlinker-features=+lld") .arg("-Clink-self-contained=+linker") .arg("-Zunstable-options") @@ -28,12 +27,8 @@ fn main() { ); // It should not be used when we explicitly opt-out of lld. - let output = rustc() - .env("RUSTC_LOG", "rustc_codegen_ssa::back::link=info") - .link_arg(linker_version_flag) - .arg("-Zlinker-features=-lld") - .input("main.rs") - .run(); + let output = + rustc().link_arg(linker_version_flag).arg("-Zlinker-features=-lld").input("main.rs").run(); assert!( !find_lld_version_in_logs(output.stderr_utf8()), "the LLD version string should not be present in the output logs:\n{}", @@ -43,7 +38,6 @@ fn main() { // While we're here, also check that the last linker feature flag "wins" when passed multiple // times to rustc. let output = rustc() - .env("RUSTC_LOG", "rustc_codegen_ssa::back::link=info") .link_arg(linker_version_flag) .arg("-Clink-self-contained=+linker") .arg("-Zunstable-options") @@ -60,6 +54,7 @@ fn main() { } fn find_lld_version_in_logs(stderr: String) -> bool { - let lld_version_re = Regex::new(r"^LLD [0-9]+\.[0-9]+\.[0-9]+").unwrap(); + let lld_version_re = + Regex::new(r"^warning: linker std(out|err): LLD [0-9]+\.[0-9]+\.[0-9]+").unwrap(); stderr.lines().any(|line| lld_version_re.is_match(line.trim())) } |
