Description
Since the Swift SDK Generator is becoming more and more useful for generating Swift SDKs for various Linux versions and architectures, one thing I think would be very useful is to have the ability to generate a Swift SDK for a custom sysroot and using a custom distribution name and version. For example, say I built Swift for openSUSE Leap 15, then wanted to create a Swift SDK targeting that. I could do something like this:
swift run swift-sdk-generator make-linux-sdk --swift-version 6.0.3-RELEASE \
--target-sysroot ~/sysroot-opensuse-leap-15 --target-swift-package-path ~/swift-6.0.3-opensuse-leap-15 \
--linux-distribution-name opensuse --linux-distribution-version leap-15
This suggests adding the --target-sysroot
option to use for the target SDK instead of relying on a container or downloading packages (like for Ubuntu). And also, this would be required if the --linux-distribution-name
and --linux-distribution-version
are passed with unknown values.
I see this could even be useful for the case where people are building Swift for completely different distributions, like Yocto for example. Someone could have their custom-baked Linux distro and custom build of Swift, and generate a Swift SDK for their platform:
swift run swift-sdk-generator make-linux-sdk --swift-version 6.0.3-RELEASE \
--target-sysroot ~/sysroot-custom-yocto --target-swift-package-path ~/swift-6.0.3-custom-yocto \
--linux-distribution-name custom-yocto --linux-distribution-version 1.0.0
Just some ideas to make the swift-sdk-generator even more capable. I will note that I'm generating my own Swift SDKs for my company's Yocto distribution. But, if the swift-sdk-generator had the support to do this then it is even more accessible for the Swift ecosystem.