Skip to content

Commit 38fdea5

Browse files
committed
enable build on iOS
1 parent a933fcf commit 38fdea5

File tree

3 files changed

+7
-5
lines changed

3 files changed

+7
-5
lines changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ dbghelp-sys = { version = "0.2", optional = true }
3030
kernel32-sys = { version = "0.2", optional = true }
3131
winapi = { version = "0.2.5", optional = true }
3232

33-
[target.'cfg(all(unix, not(target_os = "emscripten"), not(target_os = "macos")))'.dependencies]
33+
[target.'cfg(all(unix, not(target_os = "emscripten"), not(target_os = "macos"), not(target_os = "ios")))'.dependencies]
3434
backtrace-sys = { path = "backtrace-sys", version = "0.1.3", optional = true }
3535

3636
[build-dependencies]

src/symbolize/mod.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -248,12 +248,14 @@ cfg_if! {
248248
} else if #[cfg(all(feature = "libbacktrace",
249249
unix,
250250
not(target_os = "emscripten"),
251-
not(target_os = "macos")))] {
251+
not(target_os = "macos"),
252+
not(target_os = "ios")))] {
252253
mod libbacktrace;
253254
use self::libbacktrace::resolve as resolve_imp;
254255
use self::libbacktrace::Symbol as SymbolImp;
255256
} else if #[cfg(all(feature = "coresymbolication",
256-
target_os = "macos"))] {
257+
any(target_os = "macos",
258+
target_os = "ios")))] {
257259
mod coresymbolication;
258260
use self::coresymbolication::resolve as resolve_imp;
259261
use self::coresymbolication::Symbol as SymbolImp;

tests/smoke.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ use std::thread;
66
static LIBUNWIND: bool = cfg!(all(unix, feature = "libunwind"));
77
static UNIX_BACKTRACE: bool = cfg!(all(unix, feature = "unix-backtrace"));
88
static LIBBACKTRACE: bool = cfg!(all(unix, feature = "libbacktrace")) &&
9-
!cfg!(target_os = "macos");
10-
static CORESYMBOLICATION: bool = cfg!(all(target_os = "macos",
9+
!cfg!(target_os = "macos") && !cfg!(target_os = "ios");
10+
static CORESYMBOLICATION: bool = cfg!(all(any(target_os = "macos", target_os = "ios"),
1111
feature = "coresymbolication"));
1212
static DLADDR: bool = cfg!(all(unix, feature = "dladdr"));
1313
static DBGHELP: bool = cfg!(all(windows, feature = "dbghelp"));

0 commit comments

Comments
 (0)