Skip to content

Commit 6db8d1b

Browse files
committed
Change support library to rlib instead of dylib
May the Omnissiah bless this PR.
1 parent 603d72c commit 6db8d1b

File tree

4 files changed

+3
-26
lines changed

4 files changed

+3
-26
lines changed

src/bootstrap/src/core/build_steps/test.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ use crate::core::config::flags::get_completion;
2727
use crate::core::config::flags::Subcommand;
2828
use crate::core::config::TargetSelection;
2929
use crate::utils::cache::{Interned, INTERNER};
30-
use crate::utils::dylib::shared_lib_name;
3130
use crate::utils::exec::BootstrapCommand;
3231
use crate::utils::helpers::{
3332
self, add_link_lib_path, add_rustdoc_cargo_linker_args, dylib_path, dylib_path_var,
@@ -1365,7 +1364,7 @@ impl Step for RunMakeSupport {
13651364
cargo.env("RUSTFLAGS", "-C prefer-dynamic");
13661365
builder.run(&mut cargo);
13671366

1368-
let lib_name = shared_lib_name("run_make_support", &self.target.to_string());
1367+
let lib_name = "librun_make_support.rlib";
13691368
let lib = builder.tools_dir(self.compiler).join(&lib_name);
13701369

13711370
let cargo_out =

src/bootstrap/src/utils/dylib.rs

-13
Original file line numberDiff line numberDiff line change
@@ -38,16 +38,3 @@ pub fn exe(name: &str, target: &str) -> String {
3838
name.to_string()
3939
}
4040
}
41-
42-
/// Given a shared library called `name`, return the filename for the
43-
/// shared library for a particular target.
44-
#[allow(dead_code)]
45-
pub fn shared_lib_name(name: &str, target: &str) -> String {
46-
if target.contains("windows") {
47-
format!("{name}.dll")
48-
} else if target.contains("apple") {
49-
format!("lib{name}.dylib")
50-
} else {
51-
format!("lib{name}.so")
52-
}
53-
}

src/tools/compiletest/src/runtest.rs

+2-8
Original file line numberDiff line numberDiff line change
@@ -3741,7 +3741,7 @@ impl<'test> TestCx<'test> {
37413741
fn run_rmake_v2_test(&self) {
37423742
// For `run-make` V2, we need to perform 2 steps to build and run a `run-make` V2 recipe
37433743
// (`rmake.rs`) to run the actual tests. The support library is already built as a tool
3744-
// dylib and is available under `build/$TARGET/stageN-tools-bin/librun_make_support.so`.
3744+
// dylib and is available under `build/$TARGET/stageN-tools-bin/librun_make_support.rlib`.
37453745
//
37463746
// 1. We need to build the recipe `rmake.rs` and link in the support library.
37473747
// 2. We need to run the recipe to build and run the tests.
@@ -3764,13 +3764,7 @@ impl<'test> TestCx<'test> {
37643764
let mut support_dylib_path = PathBuf::new();
37653765
support_dylib_path.push(&build_root);
37663766
support_dylib_path.push(format!("{}-tools-bin", stage));
3767-
if self.config.target.contains("windows") {
3768-
support_dylib_path.push("run_make_support.dll");
3769-
} else if self.config.target.contains("apple") {
3770-
support_dylib_path.push("librun_make_support.dylib");
3771-
} else {
3772-
support_dylib_path.push("librun_make_support.so");
3773-
}
3767+
support_dylib_path.push("librun_make_support.rlib");
37743768

37753769
let mut stage_std_path = PathBuf::new();
37763770
stage_std_path.push(&build_root);

src/tools/run-make-support/Cargo.toml

-3
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,5 @@ name = "run_make_support"
33
version = "0.0.0"
44
edition = "2021"
55

6-
[lib]
7-
crate-type = ["dylib"]
8-
96
[dependencies]
107
shell-words = "1.1"

0 commit comments

Comments
 (0)