about summary refs log tree commit diff
path: root/src/bootstrap
diff options
context:
space:
mode:
authorJames Farrell <jamesfarrell@google.com>2023-04-06 18:53:29 +0000
committerJames Farrell <jamesfarrell@google.com>2023-04-06 18:53:29 +0000
commit7944930b0908cecfd58a47ca2b7b2b42136ada14 (patch)
tree0fba9c9f648433c12be81eed341c177afdc54e2c /src/bootstrap
parent60660371efe59dfc99644e9d709a1b71e25ae2ac (diff)
downloadrust-7944930b0908cecfd58a47ca2b7b2b42136ada14.tar.gz
rust-7944930b0908cecfd58a47ca2b7b2b42136ada14.zip
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.
Diffstat (limited to 'src/bootstrap')
-rw-r--r--src/bootstrap/test.rs5
1 files changed, 4 insertions, 1 deletions
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();