Commit 56d1ce1
Replace xcodebuild with cc crate in build.rs
The pomace Objective-C files are compiled using the cc crate instead of
invoking xcodebuild directly. This removes the hard dependency on
Xcode.app, enabling builds with just Apple Command Line Tools and in
sandboxed environments like Nix.
Changes:
- Use cc::Build to compile each pomace .m file individually
- Add -fobjc-arc, -fobjc-weak, -fno-common flags to match Xcode's
build settings
- Add -include Foundation/Foundation.h for targets that import C-only
frameworks (e.g. CoreAudio) but use Foundation types
- Use CC env var / cc crate compiler detection for clang_rt discovery
instead of hardcoded /usr/bin/clang
- Try SDKROOT env var before falling back to xcrun for Mac Catalyst
- Preserve all platform-conditional target gating from the original
Framework linking is unchanged — cidre's Rust source handles it via
#[link] attributes, same as before.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>1 parent 8bd2b40 commit 56d1ce1
2 files changed
+140
-164
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
280 | 280 | | |
281 | 281 | | |
282 | 282 | | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
283 | 286 | | |
284 | 287 | | |
285 | 288 | | |
| |||
0 commit comments