Skip to content

Commit a980a3a

Browse files
committed
Revert src/tools/run-make-support/ changes
1 parent b7119a7 commit a980a3a

3 files changed

Lines changed: 6 additions & 26 deletions

File tree

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ edition = "2024"
1313
bstr = "1.12"
1414
gimli = "0.32"
1515
libc = "0.2"
16-
object = { version = "0.37", features = ["read", "compression", "wasm"] }
16+
object = "0.37"
1717
regex = "1.11"
1818
serde_json = "1.0"
1919
similar = "2.7"

src/tools/run-make-support/src/artifact_names.rs

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
//! libraries which are target-dependent.
33
44
use crate::target;
5-
use crate::targets::{is_wasi, is_windows, is_windows_msvc};
5+
use crate::targets::is_windows_msvc;
66

77
/// Construct the static library name based on the target.
88
#[track_caller]
@@ -22,24 +22,18 @@ pub fn dynamic_lib_name(name: &str) -> String {
2222
format!("{}{name}.{}", dynamic_lib_prefix(), dynamic_lib_extension())
2323
}
2424

25-
/// Returns the value of `DLL_PREFIX` from `library/std/src/sys/env_consts.rs`
26-
/// for the target platform indicated by `crate::target()`.
2725
fn dynamic_lib_prefix() -> &'static str {
28-
// FIXME: Cover more exotic platform like `uefi`.
29-
if is_wasi() || is_windows() { "" } else { "lib" }
26+
if target().contains("windows") { "" } else { "lib" }
3027
}
3128

32-
/// Returns the value of `DLL_EXTENSION` from `library/std/src/sys/env_consts.rs`
33-
/// for the target platform indicated by `crate::target()`.
29+
/// Construct the dynamic library extension based on the target.
3430
#[must_use]
3531
pub fn dynamic_lib_extension() -> &'static str {
36-
// FIXME: Cover more exotic platform like `uefi`.
3732
let target = target();
33+
3834
if target.contains("apple") {
3935
"dylib"
40-
} else if is_wasi() {
41-
"wasm"
42-
} else if is_windows() {
36+
} else if target.contains("windows") {
4337
"dll"
4438
} else if target.contains("aix") {
4539
"a"

src/tools/run-make-support/src/targets.rs

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -34,20 +34,6 @@ pub fn is_win7() -> bool {
3434
target().contains("win7")
3535
}
3636

37-
/// Check if target uses WASI
38-
pub fn is_wasi() -> bool {
39-
// The condition below is roughly equivalent to the following `cfg`
40-
// attribute from `library/std/src/sys/env_consts.rs`.
41-
//
42-
// ```
43-
// #[cfg(all(
44-
// target_family = "wasm",
45-
// not(any(target_os = "emscripten", target_os = "linux"))
46-
// ))]
47-
// ```
48-
target().starts_with("wasm") && !target().contains("linux") && !target().contains("emscripten")
49-
}
50-
5137
/// Check if target uses macOS.
5238
#[must_use]
5339
pub fn is_darwin() -> bool {

0 commit comments

Comments
 (0)