You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add new options that control whether host toolchain is included (#165)
This adds a new `--no-host-toolchain` flag to the `make-linux-sdk` sub-command, making it possible to generate an SDK for x86_64 or aarch64 with only the target sysroot and Swift libraries, like this:
```bash
# x86_64
swift run swift-sdk-generator make-linux-sdk --swift-version 6.0.3-RELEASE --target x86_64-unknown-linux-gnu --no-include-host-toolchain
# aarch64
swift run swift-sdk-generator make-linux-sdk --swift-version 6.0.3-RELEASE --target aarch64-unknown-linux-gnu --no-include-host-toolchain
```
I tested the generated SDKs on both Ubuntu 22.04 and macOS 15 and they work just fine.
Ubuntu x86_64 -> aarch64:
```bash
> swift build --swift-sdk 6.0.3-RELEASE_ubuntu_jammy_aarch64
Building for debugging...
warning: Could not read SDKSettings.json for SDK at: ~/.swiftpm/swift-sdks/6.0.3-RELEASE_ubuntu_jammy_aarch64.artifactbundle/6.0.3-RELEASE_ubuntu_jammy_aarch64/aarch64-unknown-linux-gnu/ubuntu-jammy.sdk
[485/485] Linking ConsumePublishServices
Build complete! (25.37s)
```
macOS arm64 -> x86_64:
```bash
> swift build --swift-sdk 6.0.3-RELEASE_ubuntu_jammy_x86_64
Building for debugging...
warning: Could not read SDKSettings.json for SDK at: /Users/xtremek/Library/org.swift.swiftpm/swift-sdks/6.0.3-RELEASE_ubuntu_jammy_x86_64.artifactbundle/6.0.3-RELEASE_ubuntu_jammy_x86_64/x86_64-unknown-linux-gnu/ubuntu-jammy.sdk
<unknown>:0: warning: libc not found for 'x86_64-unknown-linux-gnu'; C stdlib may be unavailable
[1171/1171] Linking ConsumePublishServices
Build complete! (39.43s)
```
0 commit comments