swift-testing
swift-testing copied to clipboard
Cannot enable C++ interop (deployment target too low)
We cannot enable C++ interop in the package because it is only available as of macOS 13 (and aligned Apple releases.) Attempting to build produces this error diagnostic:
🛑 Compiling for macOS 10.15, but module 'CxxStdlib' has a minimum deployment target of macOS 13.0: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/CxxStdlib.swiftmodule/arm64-apple-macos.swiftmodule
The less-c++ tag may seem ironic but if we have C++ interop enabled, we can write code that directly interfaces with C++ code/dependencies we might have (for instance, allowing us to directly set _swift_willThrow from Swift instead of needing a C++ helper function.