build: take the SDK from the selected developer dir, not the host OS - #26
Merged
Merged
Conversation
`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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
build.shresolved the SDK withxcrun --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.this SDK is not supported by the compiler.release.sh→package.sh→build.shcould not produce 0.4.0.xcrun --sdk macosx --show-sdk-path, so the SDK andswiftccome from the samexcode-selected developer dir.SDKROOTstill overrides. The chosen SDK is printed in the build log.Verification
env -u SDKROOT ./scripts/build.sh aarch64-apple-darwinsucceeds and selectsMacOSX26.5.sdkfrom Xcode.v0.4.0-rc1:LC_BUILD_VERSIONminos 14.0 / sdk 26.5 on both slices, identical linked-dylib list.shellcheck -S warningclean.🤖 Generated with Claude Code