about summary refs log tree commit diff
diff options
context:
space:
mode:
authorclubby789 <jamie@hill-daniel.co.uk>2024-10-27 14:53:50 +0000
committerclubby789 <jamie@hill-daniel.co.uk>2024-10-27 14:56:35 +0000
commit9bb6e0789c2eb9a39c26d52f905326182669c093 (patch)
tree4184178e5e387d3bea8ae6c38f8f3d1cde3d4de7
parent9fa0146c4a12ace3a23555b22797868a98128a37 (diff)
downloadrust-9bb6e0789c2eb9a39c26d52f905326182669c093.tar.gz
rust-9bb6e0789c2eb9a39c26d52f905326182669c093.zip
Dynamically link run-make support
-rw-r--r--src/tools/compiletest/src/runtest/run_make.rs1
-rw-r--r--src/tools/run-make-support/Cargo.toml3
2 files changed, 4 insertions, 0 deletions
diff --git a/src/tools/compiletest/src/runtest/run_make.rs b/src/tools/compiletest/src/runtest/run_make.rs
index e7ae773ffa1..04bc2d7787d 100644
--- a/src/tools/compiletest/src/runtest/run_make.rs
+++ b/src/tools/compiletest/src/runtest/run_make.rs
@@ -329,6 +329,7 @@ impl TestCx<'_> {
             .arg(format!("run_make_support={}", &support_lib_path.to_string_lossy()))
             .arg("--edition=2021")
             .arg(&self.testpaths.file.join("rmake.rs"))
+            .arg("-Cprefer-dynamic")
             // Provide necessary library search paths for rustc.
             .env(dylib_env_var(), &env::join_paths(host_dylib_search_paths).unwrap());
 
diff --git a/src/tools/run-make-support/Cargo.toml b/src/tools/run-make-support/Cargo.toml
index d3605cd3dce..3affa199fa5 100644
--- a/src/tools/run-make-support/Cargo.toml
+++ b/src/tools/run-make-support/Cargo.toml
@@ -13,3 +13,6 @@ gimli = "0.31.0"
 build_helper = { path = "../build_helper" }
 serde_json = "1.0"
 libc = "0.2"
+
+[lib]
+crate-type = ["lib", "dylib"]