From 7944930b0908cecfd58a47ca2b7b2b42136ada14 Mon Sep 17 00:00:00 2001 From: James Farrell Date: Thu, 6 Apr 2023 18:53:29 +0000 Subject: Pass host linker to compiletest. Tests marked `// force-host` were using the default linker, even if a custom linker was configured in config.toml. This change adds a new flag, --host-linker, to compiletest, and renames --linker to --target-linker. --- src/bootstrap/test.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/bootstrap') diff --git a/src/bootstrap/test.rs b/src/bootstrap/test.rs index 92a7603a9df..0d5672305e8 100644 --- a/src/bootstrap/test.rs +++ b/src/bootstrap/test.rs @@ -1535,7 +1535,10 @@ note: if you're sure you want to do this, please open an issue as to why. In the flags.extend(builder.config.cmd.rustc_args().iter().map(|s| s.to_string())); if let Some(linker) = builder.linker(target) { - cmd.arg("--linker").arg(linker); + cmd.arg("--target-linker").arg(linker); + } + if let Some(linker) = builder.linker(compiler.host) { + cmd.arg("--host-linker").arg(linker); } let mut hostflags = flags.clone(); -- cgit 1.4.1-3-g733a5