kabiroberai / node-swift

Create Node modules in Swift
MIT License
492 stars 16 forks source link

Support building with Xcode #14

Closed kabiroberai closed 1 year ago

kabiroberai commented 1 year ago

swift build doesn't support macros when cross-compiling, which is commonly needed for building universal macOS binaries (or even iOS if you're feeling frisky). Allow using xcodebuild to work around this. See: https://github.com/apple/swift-package-manager/issues/6950.

Ideally, we would instead pass --build-system xcode to SwiftPM but that doesn't seem to support macros either.

For easy viewing, I'd recommend looking at the PR diff with whitespace changes hidden.