about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--src/tools/run-make-support/src/external_deps/cargo.rs5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/tools/run-make-support/src/external_deps/cargo.rs b/src/tools/run-make-support/src/external_deps/cargo.rs
index e91d101cb99..8da9f002c41 100644
--- a/src/tools/run-make-support/src/external_deps/cargo.rs
+++ b/src/tools/run-make-support/src/external_deps/cargo.rs
@@ -1,8 +1,11 @@
 use crate::command::Command;
 use crate::env_var;
+use crate::util::set_host_compiler_dylib_path;
 
 /// Returns a command that can be used to invoke cargo. The cargo is provided by compiletest
 /// through the `CARGO` env var.
 pub fn cargo() -> Command {
-    Command::new(env_var("CARGO"))
+    let mut cmd = Command::new(env_var("CARGO"));
+    set_host_compiler_dylib_path(&mut cmd);
+    cmd
 }