Skip to content

Build the flatc host tools for macOS on an iOS build - #22304

Merged
shoumikhin merged 1 commit into
mainfrom
fix-ios-deployment-target
Sep 1, 2026
Merged

Build the flatc host tools for macOS on an iOS build#22304
shoumikhin merged 1 commit into
mainfrom
fix-ios-deployment-target

Conversation

@shoumikhin

@shoumikhin shoumikhin commented Aug 29, 2026

Copy link
Copy Markdown
Contributor

Problem

Xcode 26 raised the minimum iOS deployment target to 15. The ios and
ios-simulator build presets set a lower macOS deployment floor (12.0), so on a
current Xcode they can no longer configure. This is the shipping Xcode, not only
the 27 beta.

There is a second, deeper problem. The flatc and flatcc schema tools are built
by host sub-projects that run on the build machine. On an iOS build they were
handed the app's iOS deployment target. After the floor rose, that value is an iOS
minimum the host compiler rejects, so the sub-build produced a flatc the build
machine could not run, and the Apple builds failed at the schema-generation step.

Fix

  • Raise both iOS presets to 15.0 so the top-level iOS configure is legal.
  • Give the flatc/flatcc host sub-builds an explicit macOS deployment floor
    instead of the iOS target, so they target the host. The SDK root was already
    blanked for non-MAC Apple builds for the same reason; this completes it for the
    deployment target.
  • Add CMakePresets.json to the Apple workflow's path filter so a preset change
    runs the framework packaging job.
  • Fix a stale deployment-target comment in the MLX build.

Test Plan

On a Mac with the pinned iOS toolchain, the flatc host sub-build now configures
with a macOS deployment floor (14.0) rather than the iOS target, so it builds for
the host. Both iOS presets configure at 15.0 on the current Xcode, and 12.0 is
rejected.

Copilot AI lite review requested due to automatic review settings August 29, 2026 13:43
@pytorch-bot

pytorch-bot Bot commented Aug 29, 2026

Copy link
Copy Markdown

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/22304

Note: Links to docs will display an error until the docs builds have been completed.

❌ You can merge normally! (2 Unrelated Failures), 1 Unclassified Failure

As of commit 14dfcf0 with merge base 2b3a32d (image):

UNCLASSIFIED FAILURE - DrCI could not classify the following job because the workflow did not run on the merge base. The failure may be pre-existing on trunk or introduced by this PR:

  • MLX / test-mlx-dflash / test-mlx-dflash (gh) (this job did not run on the merge base, so DrCI cannot tell whether the failure is pre-existing)
    RuntimeError: Command bash /Users/runner/work/_temp/exec_script failed with exit code 1

FLAKY - The following job failed but was likely due to flakiness present on trunk:

BROKEN TRUNK - The following job failed but was present on the merge base:

👉 Rebase onto the `viable/strict` branch to avoid these failures

This comment was automatically generated by Dr. CI and updates every 15 minutes.

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Aug 29, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@shoumikhin
shoumikhin force-pushed the fix-ios-deployment-target branch from f04b508 to 840e08a Compare August 31, 2026 16:34
Copilot AI review requested due to automatic review settings August 31, 2026 16:34

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@shoumikhin shoumikhin added the release notes: none Do not include this in the release notes label Aug 31, 2026
@shoumikhin
shoumikhin force-pushed the fix-ios-deployment-target branch from 840e08a to 277fcc7 Compare August 31, 2026 18:19
Copilot AI review requested due to automatic review settings August 31, 2026 18:19

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@shoumikhin shoumikhin changed the title Raise the iOS presets' macOS deployment floor so Xcode 27 can configure Build the flatc host tools for macOS on an iOS build Aug 31, 2026
@shoumikhin
shoumikhin force-pushed the fix-ios-deployment-target branch from 277fcc7 to 5f3c62e Compare August 31, 2026 21:53
Copilot AI review requested due to automatic review settings August 31, 2026 21:53

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

Xcode 26 raised the minimum iOS deployment target to 15, so the ios and
ios-simulator presets could no longer configure at their old 12.0 floor. This is
the current shipping Xcode, not only the 27 beta. Raise both presets to 15.0.

The flatc and flatcc tools are built by host sub-projects that run on the build
machine. On an iOS build they were handed the app's iOS deployment target, and
after Xcode 26/27 that value is an iOS floor the host compiler rejects, so the
sub-builds produced a flatc the build machine could not run and the schema step
failed. Give those host sub-builds an explicit macOS floor instead of the iOS
one. The SDK-root line above them was already blanked for non-MAC Apple builds
for the same host-vs-target reason; this completes it for the deployment target.

Also add CMakePresets.json to the Apple workflow's path filter so a preset change
runs the framework packaging job, and fix a stale deployment-target comment in
the MLX build.

Test Plan:
On a Mac with the ios.toolchain, the flatc host sub-build now configures with a
macOS deployment floor (14.0) instead of the iOS target, so it targets the host.
Both iOS presets configure at 15.0 on Xcode 27; 12.0 is rejected. The preset
floor keeps the top-level iOS configure legal; the host-floor change keeps the
flatc and flatcc sub-builds runnable.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated no new comments.

@shoumikhin
shoumikhin merged commit 448fbfe into main Sep 1, 2026
261 of 264 checks passed
@shoumikhin
shoumikhin deleted the fix-ios-deployment-target branch September 1, 2026 19:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. release notes: none Do not include this in the release notes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants