When SwiftPM (swiftbuild build system) builds a multi-target Swift package against a Wasm Swift SDK, the build fails during dependency resolution / settings construction with:
error: unable to find sdk 'webassembly'
warning: ONLY_ACTIVE_ARCH=YES requested with multiple ARCHS and no active architecture could be computed; building for all applicable architectures
error: Build failed
The same root cause should affect any platform that has only a Swift SDK installed (no built-in or platform-extension-registered SDK with the platform's canonical name) — Wasm is the most exposed today because SWBWebAssemblyPlatform does not register a fallback SDK the way SWBAndroidPlatform's AndroidSDKRegistryExtension does.
This is the follow-up to #1267 / #1266: addRunDestinationSettingsPlatformSDK is one of two sites that push the platform-name canonical-SDK string for Swift-SDK-backed builds.
Reproduction
https://github.com/swiftwasm/JavaScriptKit, commit ff90c3e:
TOOLCHAINS=<recent-main-snapshot> \
swift package --swift-sdk swift-DEVELOPMENT-SNAPSHOT_wasm \
--traits Tracing --disable-sandbox \
js test --build-only --prelude ./Tests/prelude.mjs
Building for debugging...
Computing dependencies
Provisioning 19 / 60
error: unable to find sdk 'webassembly'
warning: ONLY_ACTIVE_ARCH=YES requested with multiple ARCHS and no active architecture could be computed; building for all applicable architectures
error: Build failed
(Workaround: --build-system native succeeds — the legacy build system is unaffected.)
When SwiftPM (
swiftbuildbuild system) builds a multi-target Swift package against a Wasm Swift SDK, the build fails during dependency resolution / settings construction with:The same root cause should affect any platform that has only a Swift SDK installed (no built-in or platform-extension-registered SDK with the platform's canonical name) — Wasm is the most exposed today because
SWBWebAssemblyPlatformdoes not register a fallback SDK the waySWBAndroidPlatform'sAndroidSDKRegistryExtensiondoes.This is the follow-up to #1267 / #1266:
addRunDestinationSettingsPlatformSDKis one of two sites that push the platform-name canonical-SDK string for Swift-SDK-backed builds.Reproduction
https://github.com/swiftwasm/JavaScriptKit, commitff90c3e:(Workaround:
--build-system nativesucceeds — the legacy build system is unaffected.)