kabiroberai / node-swift

Create Node modules in Swift
MIT License
472 stars 15 forks source link

Support building with Xcode #14

Closed kabiroberai closed 10 months ago

kabiroberai commented 10 months 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.