Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

reduce dependencies for windows-msvc targets #543

Merged
merged 3 commits into from
Aug 18, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ exclude = [
[dependencies]
cfg-if = "1.0"
rustc-demangle = "0.1.4"
libc = { version = "0.2.146", default-features = false }

# Optionally enable the ability to serialize a `Backtrace`, controlled through
# the `serialize-*` features below.
Expand All @@ -38,10 +37,12 @@ rustc-serialize = { version = "0.3", optional = true }
# Optionally demangle C++ frames' symbols in backtraces.
cpp_demangle = { default-features = false, version = "0.4.0", optional = true, features = ["alloc"] }

addr2line = { version = "0.21.0", default-features = false }
[target.'cfg(not(all(windows, target_env = "msvc", not(target_vendor = "uwp"))))'.dependencies]
miniz_oxide = { version = "0.7.0", default-features = false }
addr2line = { version = "0.21.0", default-features = false }
libc = { version = "0.2.146", default-features = false }

[dependencies.object]
[target.'cfg(not(all(windows, target_env = "msvc", not(target_vendor = "uwp"))))'.dependencies.object]
version = "0.32.0"
default-features = false
features = ['read_core', 'elf', 'macho', 'pe', 'unaligned', 'archive']
Expand Down
10 changes: 6 additions & 4 deletions crates/as-if-std/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,12 @@ bench = false
cfg-if = "1.0"
rustc-demangle = "0.1.21"
libc = { version = "0.2.146", default-features = false }
addr2line = { version = "0.21.0", default-features = false, optional = true }
miniz_oxide = { version = "0.7", default-features = false }

[dependencies.object]
[target.'cfg(not(all(windows, target_env = "msvc", not(target_vendor = "uwp"))))'.dependencies]
miniz_oxide = { version = "0.7.0", optional = true, default-features = false }
addr2line = { version = "0.21.0", optional = true, default-features = false }

[target.'cfg(not(all(windows, target_env = "msvc", not(target_vendor = "uwp"))))'.dependencies.object]
version = "0.32.0"
default-features = false
optional = true
Expand All @@ -30,4 +32,4 @@ cc = "1.0.67"

[features]
default = ['backtrace']
backtrace = ['addr2line', 'object']
backtrace = ['addr2line', 'miniz_oxide', 'object']
2 changes: 1 addition & 1 deletion src/symbolize/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -471,7 +471,7 @@ cfg_if::cfg_if! {
mod dbghelp;
use dbghelp as imp;
} else if #[cfg(all(
any(unix, windows),
any(unix, all(windows, target_env = "gnu")),
not(target_vendor = "uwp"),
not(target_os = "emscripten"),
any(not(backtrace_in_libstd), feature = "backtrace"),
Expand Down