Skip to content

Unversioned triple of wasm32-unknown-wasip1 should be wasm32-unknown-wasip1 #84878

@kkebo

Description

@kkebo

Description

Currently, the unversioned triple of the triple wasm32-unknown-wasip1 is wasm32-unknown-wasip. However, I think it should be wasm32-unknown-wasip1 because IIUC, the purpose of the unversioned triple is to change something like x86_64-apple-macosx10.15 to something like x86_64-apple-macosx.

That affects Swift Testing too because it's using unversionedTriple. Target Platform: wasm32-unknown-wasip is a little bit odd.

◇ Test run started.
↳ Testing Library Version: 6.3-dev (c996b0aeb4ea8c1)
↳ Target Platform: wasm32-unknown-wasip
✔ Test run with 0 tests in 0 suites passed after 0.022 seconds.

Reproduction

$ swiftc -target wasm32-unknown-wasip1 -print-target-info
{
  "compilerVersion": "Apple Swift version 6.3-dev (LLVM 0d0246569621d5b, Swift 199240b3fe97eda)",
  "swiftCompilerTag": "swift-DEVELOPMENT-SNAPSHOT-2025-10-02-a",
  "target": {
    "triple": "wasm32-unknown-wasip1",
    "unversionedTriple": "wasm32-unknown-wasip",
    "moduleTriple": "wasm32-unknown-wasip1",
    "platform": "wasi",
    "arch": "wasm32",
    "pointerWidthInBits": 32,
    "pointerWidthInBytes": 4,
    "compatibilityLibraries": [ ],
    "openbsdBTCFIEnabled": false,
    "librariesRequireRPath": false
  },
  "paths": {
    "runtimeLibraryPaths": [
      "/Users/kebo/Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-2025-10-02-a.xctoolchain/usr/lib/swift/wasi"
    ],
    "runtimeLibraryImportPaths": [
      "/Users/kebo/Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-2025-10-02-a.xctoolchain/usr/lib/swift/wasi",
      "/Users/kebo/Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-2025-10-02-a.xctoolchain/usr/lib/swift/wasi/wasm32"
    ],
    "runtimeResourcePath": "/Users/kebo/Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-2025-10-02-a.xctoolchain/usr/lib/swift"
  }
}
$ swiftc -target wasm32-unknown-wasip1 -print-target-info | grep unversionedTriple
    "unversionedTriple": "wasm32-unknown-wasip",

Expected behavior

$ swiftc -target wasm32-unknown-wasip1 -print-target-info | grep unversionedTriple
    "unversionedTriple": "wasm32-unknown-wasip1",

Environment

$ uname -a
Darwin Xylotrupes-gideon.local 25.1.0 Darwin Kernel Version 25.1.0: Sun Oct  5 21:11:28 PDT 2025; root:xnu-12377.40.120~10/RELEASE_ARM64_T8132 arm64
$ swiftc -version
Apple Swift version 6.3-dev (LLVM 0d0246569621d5b, Swift 199240b3fe97eda)
Target: arm64-apple-macosx26.0
Build config: +assertions

Additional information

If this behavior is intended, please feel free to close this issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugA deviation from expected or documented behavior. Also: expected but undesirable behavior.triage neededThis issue needs more specific labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions