Open MaxDesiatov opened 9 months ago
I think we can filter non-compatible SDKs that contain swiftmodules compiled by different compiler version than the host one and don't contain compiler tools. If we apply such filter, we can get single SDK for most senario
Description
It's confusing that the existing
--triple
option doesn't look at target triples of installed SDKs and seems to be completely detached from the Swift SDK infrastructure. We should be able to look at the list of installed SDKs and their supported target triples and select the SDK based on that. Probably for multiple Swift SDKs supporting the same target triple the CLI invocation should fail with an error message.Expected behavior
swift build --triple wasm32-unknown-wasi
picks up installed Swift SDK that supports triple.Actual behavior
swift build --triple wasm32-unknown-wasi
doesn't find the installed Swift SDK.Steps to reproduce
wasm32-unknown-wasi
target tripleswift build --triple wasm32-unknown-wasi
Swift Package Manager version/commit hash
Swift Package Manager - Swift 5.11.0-dev
Swift & OS version (output of
swift --version ; uname -a
)Swift version 5.11-dev (LLVM 87ace14daa2139a, Swift 8bb684628593220) Target: aarch64-unknown-linux-gnu