Skip to content

--triple option doesn't take installed Swift SDKs into account #7330

Open
@MaxDesiatov

Description

@MaxDesiatov

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

  1. Install a Swift SDK that supports wasm32-unknown-wasi target triple
  2. Change current directory to the root directory of a package that you'd like to build.
  3. Run swift 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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions