SwiftPM development update: default build system change

This is a PSA that as of https://github.com/swiftlang/swift-package-manager/pull/9661, we have switched SwiftPM's default build system over to --build-system swiftbuild on the main branch (--build-system native remains available to restore previous behavior). This has passed PR testing, compiler smoke testing, toolchain builds, and our own compatibility testing against the Swift Package Index. However, with a change like this, there's always a possibility for some unanticipated issues to pop up. If you do notice any issues or impact to your workflows, please file issues on the SwiftPM repo with either the "swift build" label or some indication in the title - we will be treating these as very high priority. For urgent issues, I can be reached directly by forums DM.

Thanks,
Owen

Relevant changes:

12 Likes

Looks like I've got to go back and make sure swift-build works on OpenBSD again. Last I checked there was some work to do there.

Is there something that tracks the eventual flip of this to the release branches? Or are we sort of pitching this towards 6.5 eventually?

1 Like

Since 6.4 has not branched yet, we expect this change to be on that branch once it’s created. I’m not aware of specific issues on OpenBSD right now, but FreeBSD has received more attention in comparison. Happy to take a look if you run into any issues

3 Likes

Hi @owenv !

What would be needed for supporting XCFrameworks?
Happy to enable this by default in the nightly CI as soon as we can compile our code base.

6.3 gives currently:

error: Multiple commands produce OrdoEssentials.framework
warning: duplicate output file OrdoEssentials.framework/Versions/A on task: Copy .build/artifacts/ordo-sdk/OrdoSDK-OrdoEssentials/OrdoEssentials.xcframework/macos-arm64/OrdoEssentials.framework

Also looking forward for CAS caching to be enabled via this change!

Looks to be related:

The new backend does include support for xcframeworks - could you please file an issue with more detail about the failure you’re hitting, including steps to reproduce if possible?

Reproduced this way: xcframework and snippets error: Multiple commands produce · Issue #1242 · swiftlang/swift-build · GitHub

Our main repo doesn't directly has snippets, but hopefully the cause is the same.

Thank you for the reduced example - this should be addressed with Do not attempt to embed xcframework contents in non-bundle product types by owenv · Pull Request #1244 · swiftlang/swift-build · GitHub

2 Likes

@owenv thanks!
--build-system swiftbuild works now! Switching from 6.3 to swift-DEVELOPMENT-SNAPSHOT-2026-04-01 reveals 2 new actor isolation errors and 3 compiler crashes.

We also have an Xcode project which has ~50 SPM dependencies; is there anything to test here? SPM is only used to checkout the source code in this case?

Could you please advise on XCFramework: Unknown library type with extension 'so' in library 'linux-aarch64' · Issue #1250 · swiftlang/swift-build · GitHub ?