Skip to content

PackagePIFProjectBuilder+Modules.swift: Add missing .emscripten#10002

Open
MaxDesiatov wants to merge 5 commits into
mainfrom
maxd/emscripten-fix
Open

PackagePIFProjectBuilder+Modules.swift: Add missing .emscripten#10002
MaxDesiatov wants to merge 5 commits into
mainfrom
maxd/emscripten-fix

Conversation

@MaxDesiatov
Copy link
Copy Markdown
Contributor

14:09:47  /Users/ec2-user/jenkins/workspace/swift-package-manager-with-xcode-self-hosted-PR-osx-release-toolchain/branch-main/swiftpm/Sources/SwiftBuildSupport/PackagePIFProjectBuilder+Modules.swift:569:17: error: switch must be exhaustive
14:09:47  567 |             for platform in ProjectModel.BuildSettings.Platform.allCases {
14:09:47  568 |                 // darwin & freebsd
14:09:47  569 |                 switch platform {
14:09:47      |                 |- error: switch must be exhaustive
14:09:47      |                 `- note: add missing case: '.emscripten'
14:09:47  570 |                     case .macOS, .macCatalyst, .iOS, .watchOS, .tvOS, .xrOS, .driverKit, .freebsd:
14:09:47  571 |                         impartedSettings[.OTHER_LDFLAGS, platform] = ["-lc++", "$(inherited)"]

@MaxDesiatov
Copy link
Copy Markdown
Contributor Author

@swift-ci test

@MaxDesiatov
Copy link
Copy Markdown
Contributor Author

@swift-ci test

@MaxDesiatov
Copy link
Copy Markdown
Contributor Author

@swift-ci test windows

@MaxDesiatov
Copy link
Copy Markdown
Contributor Author

@swift-ci test

@MaxDesiatov
Copy link
Copy Markdown
Contributor Author

@swift-ci test windows

@MaxDesiatov MaxDesiatov enabled auto-merge (squash) April 29, 2026 13:41
@MaxDesiatov
Copy link
Copy Markdown
Contributor Author

@swift-ci test windows self-hosted

Comment thread Tests/SwiftBuildSupportTests/PIFBuilderTests.swift
@MaxDesiatov
Copy link
Copy Markdown
Contributor Author

@swift-ci test

@MaxDesiatov
Copy link
Copy Markdown
Contributor Author

@swift-ci test windows

@MaxDesiatov
Copy link
Copy Markdown
Contributor Author

@swift-ci test macos

Copy link
Copy Markdown
Contributor

@owenv owenv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Renaming the webassembly platform to was requires additional coordinated changes that are breaking the integration tests here. Reverting in swiftlang/swift-build#1358 for now

@MaxDesiatov MaxDesiatov disabled auto-merge April 29, 2026 17:30
Copy link
Copy Markdown
Contributor

@owenv owenv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe this is correct now, thanks

configDir += "-android"
} else if self.triple.isWasm {
} else if self.triple.isWasm && self.triple.isNoneOS() {
// Legacy suffix for bare-metal wasm (wasm32-unknown-none-wasm).
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we need this? This has never been a thing until Swift Build, which isn't even released yet.

```
14:09:47  /Users/ec2-user/jenkins/workspace/swift-package-manager-with-xcode-self-hosted-PR-osx-release-toolchain/branch-main/swiftpm/Sources/SwiftBuildSupport/PackagePIFProjectBuilder+Modules.swift:569:17: error: switch must be exhaustive
14:09:47  567 |             for platform in ProjectModel.BuildSettings.Platform.allCases {
14:09:47  568 |                 // darwin & freebsd
14:09:47  569 |                 switch platform {
14:09:47      |                 |- error: switch must be exhaustive
14:09:47      |                 `- note: add missing case: '.emscripten'
14:09:47  570 |                     case .macOS, .macCatalyst, .iOS, .watchOS, .tvOS, .xrOS, .driverKit, .freebsd:
14:09:47  571 |                         impartedSettings[.OTHER_LDFLAGS, platform] = ["-lc++", "$(inherited)"]
```
@MaxDesiatov MaxDesiatov force-pushed the maxd/emscripten-fix branch from 58ab687 to 5f7ab0d Compare May 11, 2026 19:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants