about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
author许杰友 Jieyou Xu (Joe) <39484203+jieyouxu@users.noreply.github.com>2024-10-28 13:36:19 +0800
committerGitHub <noreply@github.com>2024-10-28 13:36:19 +0800
commitafc93a912859cc33437d6cab8d48e32e3863d2d0 (patch)
tree144bad979824c41af89a947fcd280636ba031574 /src
parent5c14e3d54cfc7302d301a5aacb2b466e23b8c2c1 (diff)
parent9bb6e0789c2eb9a39c26d52f905326182669c093 (diff)
downloadrust-afc93a912859cc33437d6cab8d48e32e3863d2d0.tar.gz
rust-afc93a912859cc33437d6cab8d48e32e3863d2d0.zip
Rollup merge of #132225 - clubby789:run-make-dynamic, r=jieyouxu
Dynamically link run-make support

Fixes #131810

r? `@jieyouxu`
Diffstat (limited to 'src')
-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"]