Get apple sdk root from cc instead of xcrun #3
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.
What
As part of Tauri building via Bazel, this PR fixes a hermeticity bug coming from
swift-rs.Specifically,
swift-rspreviously used the host machine'sxcrunto fetch the Apple SDKs and deployment targets for iOS and OSX. The issue is thatxcrunis a host-machine binary which pointscc-rsat non-hermetic XCode SDKs. This results in non-hermetic builds locally (when XCode and XCode CLI Tools have been downloaded) and failing builds on CI (when they are not present). The error you get on CI is:Our solution here is to use
ccto find the SDK path and deployment target. Feels like somewhat of a hack, but appears to work and the code is simple enough.Testing
I can build and run Doty run with this plus the new
rust_binary()target on my local machine. We'll still have to see if it gets CI to pass, but it's a step in the right direction.