Skip to content

build: take the SDK from the selected developer dir, not the host OS - #26

Merged
hiking90 merged 1 commit into
mainfrom
build/sdk-from-selected-toolchain
Sep 19, 2026
Merged

hiking90 merged 1 commit into
mainfrom
build/sdk-from-selected-toolchain

Conversation

@hiking90

Copy link
Copy Markdown
Owner

Summary

  • build.sh resolved the SDK with xcrun --show-sdk-path. Without --sdk, xcrun looks for an SDK matching the host OS and falls through to CommandLineTools when the selected Xcode lacks one.
  • On a macOS 27 host with Xcode 26.6 (only a 26.5 SDK), that picked CLT's 27.0 SDK, which is built for Swift 6.4. Xcode's swiftc 6.3.3 then failed with this SDK is not supported by the compiler. release.shpackage.shbuild.sh could not produce 0.4.0.
  • Use xcrun --sdk macosx --show-sdk-path, so the SDK and swiftc come from the same xcode-selected developer dir. SDKROOT still overrides. The chosen SDK is printed in the build log.

Verification

  • env -u SDKROOT ./scripts/build.sh aarch64-apple-darwin succeeds and selects MacOSX26.5.sdk from Xcode.
  • Output is the same as v0.4.0-rc1: LC_BUILD_VERSION minos 14.0 / sdk 26.5 on both slices, identical linked-dylib list.
  • shellcheck -S warning clean.

🤖 Generated with Claude Code

`xcrun --show-sdk-path` without --sdk looks for an SDK matching the host
OS and falls through to CommandLineTools when the selected Xcode has none.
On a macOS 27 host with Xcode 26.6 that picked the CLT 27.0 SDK (built
for Swift 6.4), and Xcode's swiftc 6.3 rejected it: "this SDK is not
supported by the compiler". Ask for `--sdk macosx` so the SDK and swiftc
come from the same xcode-select'ed developer dir; SDKROOT still overrides.

The output matches v0.4.0-rc1: minos 14.0, sdk 26.5, same linked dylibs.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@hiking90
hiking90 merged commit 309f216 into main Sep 19, 2026
2 checks passed
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.

1 participant