add link_arg helper to run_make_support

and use it in the `rust-lld` tests
This commit is contained in:
Rémy Rakic 2024-04-15 18:08:55 +00:00
parent 8fa6984e8e
commit 8acfe9a138
3 changed files with 11 additions and 5 deletions

View file

@ -149,6 +149,12 @@ impl Rustc {
self
}
/// Add an extra argument to the linker invocation, via `-Clink-arg`.
pub fn link_arg(&mut self, link_arg: &str) -> &mut Self {
self.cmd.arg(format!("-Clink-arg={link_arg}"));
self
}
#[track_caller]
pub fn run_fail_assert_exit_code(&mut self, code: i32) -> Output {
let caller_location = std::panic::Location::caller();