Skip to content

Commit 3bea062

Browse files
authored
Merge pull request #39 from king6cong/master
enable build on iOS
2 parents 5b4fac3 + 38fdea5 commit 3bea062

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
@@ -258,12 +258,14 @@ cfg_if! {
258258
} else if #[cfg(all(feature = "libbacktrace",
259259
unix,
260260
not(target_os = "emscripten"),
261-
not(target_os = "macos")))] {
261+
not(target_os = "macos"),
262+
not(target_os = "ios")))] {
262263
mod libbacktrace;
263264
use self::libbacktrace::resolve as resolve_imp;
264265
use self::libbacktrace::Symbol as SymbolImp;
265266
} else if #[cfg(all(feature = "coresymbolication",
266-
target_os = "macos"))] {
267+
any(target_os = "macos",
268+
target_os = "ios")))] {
267269
mod coresymbolication;
268270
use self::coresymbolication::resolve as resolve_imp;
269271
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)