Skip to content

Conversation

jakepetroules
Copy link
Collaborator

This is just going in SWBUniversalPlatform for now for simplicity / bringup, and should maybe move into a new SWBNonePlatformPlugin later on.

Closes #726

@jakepetroules
Copy link
Collaborator Author

@swift-ci test

@jakepetroules
Copy link
Collaborator Author

Please keep in mind that a none triple does not mean Swift Embedded, or that you even have Swift at all. Do not make assumptions that you're in such an environment when using this SDK/platform. It should generalize to any "none" triple, including a plain C environment.

@jakepetroules
Copy link
Collaborator Author

@swift-ci test

@dschaefer2
Copy link
Member

Please keep in mind that a none triple does not mean Swift Embedded, or that you even have Swift at all. Do not make assumptions that you're in such an environment when using this SDK/platform. It should generalize to any "none" triple, including a plain C environment.

Correct. From the SwiftPM perspective, these platforms are generally accompanied by a toolset.json file which contains most importantly a --sysroot argument pointing to the C runtime to be used in the build. It also contains architecture specific options for the C and Swift compilers and the linker. And often, but not always, will enable the Embedded feature, at least for microcontroller platforms.

That said, the extraCLIOptions from the toolset get tacked into the extraArgs and passed to the SwiftBuild request along with the other swift build CLI args.

Longer term, we probably should look at how to do these platforms as proper SDKs with an SDKSettings.json instead of the toolset.json/sysroot to unify how we present platforms to SwiftBuild.

@jakepetroules
Copy link
Collaborator Author

Longer term, we probably should look at how to do these platforms as proper SDKs with an SDKSettings.json instead of the toolset.json/sysroot to unify how we present platforms to SwiftBuild.

Maybe. It's not clear to me yet whether SDKSettings should be the canonical format used everywhere vs one remaining specific to Apple platforms. Its schema is fairly ad-hoc and maybe not the best fit for something more general purpose.

@jakepetroules
Copy link
Collaborator Author

@swift-ci test

@jakepetroules
Copy link
Collaborator Author

@swift-ci test macOS

@jakepetroules
Copy link
Collaborator Author

@swift-ci test

@jakepetroules
Copy link
Collaborator Author

@swift-ci test macOS

This is just going in SWBUniversalPlatform for now for simplicity / bringup, and should maybe move into a new SWBNonePlatformPlugin later on.

Closes swiftlang#726
@jakepetroules
Copy link
Collaborator Author

@swift-ci test

@jakepetroules jakepetroules merged commit 358fab5 into swiftlang:main Aug 30, 2025
36 checks passed
@jakepetroules jakepetroules deleted the eng/PR-baremetal branch August 30, 2025 09:18
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.

Add support for platform "none" for embedded targets

4 participants