Make std_detect a direct dependency of std

This commit is contained in:
Jakub Beránek 2025-07-04 09:51:28 +02:00
parent 5b2de8ab27
commit b23ab7888a
No known key found for this signature in database
GPG key ID: 909CD0D26483516B
3 changed files with 7 additions and 16 deletions

View file

@ -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]]

View file

@ -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"]

View file

@ -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",
]