Skip to content

Refactor swiftSDKAdditionalCustomProperties into SwiftSDKAdditionalContext struct#1270

Merged
jakepetroules merged 1 commit into
swiftlang:mainfrom
jakepetroules:eng/PR-android
Apr 4, 2026
Merged

Refactor swiftSDKAdditionalCustomProperties into SwiftSDKAdditionalContext struct#1270
jakepetroules merged 1 commit into
swiftlang:mainfrom
jakepetroules:eng/PR-android

Conversation

@jakepetroules

@jakepetroules jakepetroules commented Apr 2, 2026

Copy link
Copy Markdown
Collaborator

Rename swiftSDKAdditionalCustomProperties to swiftSDKAdditionalContext and have it return an optional SwiftSDKAdditionalContext struct that carries additionalCustomProperties along with new overrideSdkRoot and overrideToolsetAbsolutePaths fields. This allows platform extensions to provide SDK root and toolset overrides through the same mechanism, moving Android-specific hacks out of SDKRegistry and into the Android plugin.

This also removes unnecessary and incorrectly ordered search paths for Android, and adds a new hack to override -sdk to point at the NDK, which fixes a warning and also causes the correct clang search paths to be found, like we do on Windows.

Closes swiftlang/swift#88282

@jakepetroules jakepetroules added the android Support for the Android platform label Apr 2, 2026
@jakepetroules jakepetroules moved this to In Progress in Swift on Android Apr 2, 2026
@jakepetroules jakepetroules moved this to In Progress in SwiftPM on SwiftBuild Apr 2, 2026
@jakepetroules

Copy link
Copy Markdown
Collaborator Author

@swift-ci test

@jakepetroules

Copy link
Copy Markdown
Collaborator Author

@swift-ci test

@jakepetroules
jakepetroules requested a review from finagolfin April 2, 2026 18:03
Comment thread Sources/SWBAndroidPlatform/Plugin.swift
@jakepetroules

Copy link
Copy Markdown
Collaborator Author

OK, this latest push successfully builds swift-rule-engine and swift-foundation.

@jakepetroules

Copy link
Copy Markdown
Collaborator Author

@swift-ci test

@jakepetroules

Copy link
Copy Markdown
Collaborator Author

@swift-ci test

@jakepetroules

Copy link
Copy Markdown
Collaborator Author

@swift-ci test

@owenv owenv left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Reapproving the updated changes with the clang resource dir fix

@jakepetroules

Copy link
Copy Markdown
Collaborator Author

@swift-ci test

…ntext struct

Rename swiftSDKAdditionalCustomProperties to swiftSDKAdditionalContext and have it
return an optional SwiftSDKAdditionalContext struct that carries additionalCustomProperties
along with new overrideSdkRoot and overrideToolsetAbsolutePaths fields. This allows
platform extensions to provide SDK root and toolset overrides through the same mechanism,
moving Android-specific hacks out of SDKRegistry and into the Android plugin.

This also removes unnecessary and incorrectly ordered search paths for Android, and adds
a new hack to override -sdk to point at the NDK, which fixes a warning and also causes
the correct clang search paths to be found, like we do on Windows.
@jakepetroules

Copy link
Copy Markdown
Collaborator Author

@swift-ci test

@jakepetroules
jakepetroules merged commit 8e0514c into swiftlang:main Apr 4, 2026
156 of 165 checks passed
@jakepetroules
jakepetroules deleted the eng/PR-android branch April 4, 2026 00:35
@github-project-automation github-project-automation Bot moved this from In Progress to Done in SwiftPM on SwiftBuild Apr 4, 2026
@github-project-automation github-project-automation Bot moved this from In Progress to Done in Swift on Android Apr 4, 2026
@finagolfin

Copy link
Copy Markdown
Member

@jakepetroules, @kateinoigakukun, and @MaxDesiatov, all linux trunk snapshot toolchain CI are failing today because of a wasm SwiftPM integration test, and this pull seems like the most likely candidate for that issue, just letting you guys know.

@finagolfin

Copy link
Copy Markdown
Member

Never mind, seems fixed by #1281 instead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

android Support for the Android platform

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

swift-foundation fails to build for Android with 4/1 nightly toolchain

3 participants