Skip to content

Commit 2ff90df

Browse files
committed
build(sim): scope objc2/private-framework deps to macOS so Linux CI skips the ObjC helper
1 parent f82366b commit 2ff90df

1 file changed

Lines changed: 8 additions & 3 deletions

File tree

crates/linkcode-sim/Cargo.toml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,15 @@ name = "linkcode-sim"
1414
path = "src/main.rs"
1515

1616
[dependencies]
17-
block2 = "0.6.2"
1817
libc = "0.2.189"
18+
serde = { version = "1.0.228", features = ["derive"] }
19+
serde_json = "1.0.150"
20+
21+
# The private-framework layer (CoreSimulator/SimulatorKit via objc2/block2) is macOS-only and its
22+
# use is all behind `#[cfg(target_os = "macos")]`. Scope these deps to macOS so a Linux CI build
23+
# doesn't compile objc2's Objective-C exception helper, which needs an ObjC toolchain (cc1obj).
24+
[target.'cfg(target_os = "macos")'.dependencies]
25+
block2 = "0.6.2"
1926
objc2 = { version = "0.6.4", features = ["exception"] }
2027
objc2-core-foundation = "0.3.2"
2128
objc2-foundation = "0.3.2"
22-
serde = { version = "1.0.228", features = ["derive"] }
23-
serde_json = "1.0.150"

0 commit comments

Comments
 (0)