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.
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.