Skip to content

Commit

Permalink
Use gimli on Linux, coresym on macOS
Browse files Browse the repository at this point in the history
Fixes source printing after switching the working dir to something != the root source directory by ditching libbacktrace.

Resolves #2
  • Loading branch information
athre0z committed Jun 29, 2019
1 parent e006b7e commit b907138
Showing 1 changed file with 11 additions and 6 deletions.
17 changes: 11 additions & 6 deletions Cargo.toml
Expand Up @@ -16,14 +16,19 @@ keywords = [
"pretty",
]

[features]
failure-bt = ["failure"]

[dependencies]
backtrace = "0.3"
term = "0.5"
atty = "0.2"
failure = { version = "0.1", optional = true }

[features]
failure-bt = ["failure"]
[target.'cfg(target_os="linux")'.dependencies]
backtrace = { version = "0.3", features = ["gimli-symbolize"] }

[target.'cfg(target_os="macos")'.dependencies]
backtrace = { version = "0.3", features = ["coresymbolication"] }

[dependencies.failure]
optional = true
version = "0.1.5"
[target.'cfg(not(any(target_os="macos", target_os="linux")))'.dependencies]
backtrace = { version = "0.3" }

0 comments on commit b907138

Please sign in to comment.