diff options
| author | Jakub Beránek <berykubik@gmail.com> | 2025-07-04 09:51:28 +0200 |
|---|---|---|
| committer | Jakub Beránek <berykubik@gmail.com> | 2025-07-22 20:17:23 +0200 |
| commit | b23ab7888a06f548e8d9a5951e97cb68399e31b3 (patch) | |
| tree | 93dbdfd085f61924eeedac8d490316c1bcd7ddeb | |
| parent | 5b2de8ab27e4a319e23817b61830a5cc6fd1745e (diff) | |
| download | rust-b23ab7888a06f548e8d9a5951e97cb68399e31b3.tar.gz rust-b23ab7888a06f548e8d9a5951e97cb68399e31b3.zip | |
Make `std_detect` a direct dependency of `std`
| -rw-r--r-- | library/Cargo.lock | 4 | ||||
| -rw-r--r-- | library/std/Cargo.toml | 7 | ||||
| -rw-r--r-- | library/std_detect/Cargo.toml | 12 |
3 files changed, 7 insertions, 16 deletions
diff --git a/library/Cargo.lock b/library/Cargo.lock index 8b5275e5065..94155e08398 100644 --- a/library/Cargo.lock +++ b/library/Cargo.lock @@ -340,10 +340,10 @@ dependencies = [ name = "std_detect" version = "0.1.5" dependencies = [ + "alloc", "cfg-if", + "core", "libc", - "rustc-std-workspace-alloc", - "rustc-std-workspace-core", ] [[package]] diff --git a/library/std/Cargo.toml b/library/std/Cargo.toml index 5c3132a7375..ba1e1f5218a 100644 --- a/library/std/Cargo.toml +++ b/library/std/Cargo.toml @@ -23,9 +23,7 @@ unwind = { path = "../unwind" } hashbrown = { version = "0.15", default-features = false, features = [ 'rustc-dep-of-std', ] } -std_detect = { path = "../stdarch/crates/std_detect", public = true, default-features = false, features = [ - 'rustc-dep-of-std', -] } +std_detect = { path = "../std_detect", public = true } # Dependencies of the `backtrace` crate rustc-demangle = { version = "0.1.24", features = ['rustc-dep-of-std'] } @@ -118,8 +116,7 @@ optimize_for_size = ["core/optimize_for_size", "alloc/optimize_for_size"] debug_refcell = ["core/debug_refcell"] -# Enable std_detect default features for stdarch/crates/std_detect: -# https://github.com/rust-lang/stdarch/blob/master/crates/std_detect/Cargo.toml +# Enable std_detect features: std_detect_file_io = ["std_detect/std_detect_file_io"] std_detect_dlsym_getauxval = ["std_detect/std_detect_dlsym_getauxval"] diff --git a/library/std_detect/Cargo.toml b/library/std_detect/Cargo.toml index f990e724125..8d91454726b 100644 --- a/library/std_detect/Cargo.toml +++ b/library/std_detect/Cargo.toml @@ -22,20 +22,14 @@ maintenance = { status = "experimental" } [dependencies] cfg-if = "1.0.0" - -# When built as part of libstd -core = { version = "1.0.0", optional = true, package = "rustc-std-workspace-core" } -alloc = { version = "1.0.0", optional = true, package = "rustc-std-workspace-alloc" } +core = { path = "../core" } +alloc = { path = "../alloc" } [target.'cfg(not(windows))'.dependencies] libc = { version = "0.2.0", optional = true, default-features = false } [features] -default = [ "std_detect_dlsym_getauxval", "std_detect_file_io" ] +default = [] std_detect_file_io = [ "libc" ] std_detect_dlsym_getauxval = [ "libc" ] std_detect_env_override = [ "libc" ] -rustc-dep-of-std = [ - "core", - "alloc", -] |
