Skip to content

Conversation

@andrewheard
Copy link
Contributor

@andrewheard andrewheard commented Dec 1, 2025

In build.sh we always provide a specific -destination, which allows xcodebuild to automatically infer the correct -sdk. Removing -sdk allows us to support Swift macros, which need different SDKs for the host and library.

Context: Swift macros run on the build host (i.e., macOS) to expand code but specifying -sdk 'iphonesimulator' (or any other SDK) results in the compiler attempting to build the macro for iOS where they aren't supported. Removing the flag allows Xcode to infer macOS for the macro and iOS for the library target based on the -destination.

#no-changelog

@andrewheard andrewheard marked this pull request as ready for review December 1, 2025 21:50
@andrewheard andrewheard changed the title [Infra] Remove -sdk flag from xcodebuild commands in build.sh [Infra] Remove -sdk flag from xcodebuild in build.sh Dec 1, 2025
Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request removes the explicit -sdk flag from xcodebuild commands in the build.sh script. As explained in the description, this is a necessary change to support Swift macros, as it allows xcodebuild to correctly infer the target SDK based on the -destination flag. The change is logical and well-implemented. I've only added one minor suggestion to fix an indentation inconsistency for better code style.

@andrewheard andrewheard requested a review from ncooke3 December 1, 2025 22:19
@andrewheard andrewheard merged commit e27633b into main Dec 2, 2025
98 checks passed
@andrewheard andrewheard deleted the ah/build-rm-sdk-flag branch December 2, 2025 15:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants