Skip to content

Raise the iOS presets' macOS deployment floor so Xcode 27 can configure - #22304

Open
shoumikhin wants to merge 1 commit into
mainfrom
fix-ios-deployment-target
Open

Raise the iOS presets' macOS deployment floor so Xcode 27 can configure#22304
shoumikhin wants to merge 1 commit into
mainfrom
fix-ios-deployment-target

Conversation

@shoumikhin

Copy link
Copy Markdown
Contributor

cmake --preset ios cannot configure on Xcode 27. The compiler check fails immediately:

error: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 12.0,
       but the range of supported deployment target versions is 15.0 to 27.0.x.

So scripts/build_apple_frameworks.sh does not run at all locally on a current Xcode. CI is green because it runs Xcode_15.4, which still accepts a 12.0 floor, so nothing surfaces this.

Why raise it rather than remove it

Removing the override looks right, since third-party/ios-cmake/ios.toolchain.cmake already sets CMAKE_OSX_DEPLOYMENT_TARGET from DEPLOYMENT_TARGET. I tried that: it builds 13231 files and then fails in the flatcc host sub-build with

cc: error: invalid version number in '-mmacosx-version-min=17.0'

third-party/CMakeLists.txt forwards CMAKE_OSX_DEPLOYMENT_TARGET into the flatcc and flatbuffers ExternalProject sub-builds, which compile for the host. Without the override they inherit DEPLOYMENT_TARGET, 17.0, and 17.0 is not a macOS version. The override is load bearing: it is the host floor for those sub-builds.

So the value has to be legal as both an iOS floor and a macOS floor. I swept it against a real configure:

CMAKE_OSX_DEPLOYMENT_TARGET=14.0  ->  configure fails
CMAKE_OSX_DEPLOYMENT_TARGET=15.0  ->  configure succeeds
CMAKE_OSX_DEPLOYMENT_TARGET=17.0  ->  configure succeeds

15.0 is the lowest that works, which keeps the host sub-builds' floor as low as it can be.

Scope

Only ios and ios-simulator. llm and profiling stay at 12.0 deliberately: they are host-only presets, and I verified Xcode 27 still accepts a macOS 12.0 floor. pybind and mlx are already at 14.0 and are untouched.

Verified

With this change the Apple framework build runs to completion on Xcode 27 and produces the xcframeworks, which it could not do before.

Xcode 27 rejects any iOS deployment target below 15.0, so cmake --preset ios
cannot configure at all: the compiler check fails with "the range of supported
deployment target versions is 15.0 to 27.0.x". CI does not see this because it
runs Xcode 15.4, which still accepts 12.0.

Removing the override instead of raising it does not work. third-party/CMakeLists.txt
forwards CMAKE_OSX_DEPLOYMENT_TARGET into the flatcc and flatbuffers host
sub-builds, so without it they inherit DEPLOYMENT_TARGET, 17.0, and fail with
"cc: error: invalid version number in '-mmacosx-version-min=17.0'" because 17.0
is not a macOS version. The value has to be legal as both an iOS and a macOS
floor. Swept it: 14.0 still fails, 15.0 and 17.0 pass, so 15.0 is the lowest that
works and keeps the host sub-builds' floor as low as possible.

llm and profiling stay at 12.0 on purpose, since they are host-only presets and
Xcode 27 still accepts a macOS 12.0 floor.
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! (1 Unrelated Failure), 1 Unclassified Failure

As of commit f04b508 with merge base c27baa8 (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:

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

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.

@github-actions

Copy link
Copy Markdown

This PR needs a release notes: label

If your change should be included in the release notes (i.e. would users of this library care about this change?), please use a label starting with release notes:. This helps us keep track and include your important work in the next release notes.

To add a label, you can comment to pytorchbot, for example
@pytorchbot label "release notes: none"

For more information, see
https://github.com/pytorch/pytorch/wiki/PyTorch-AutoLabel-Bot#why-categorize-for-release-notes-and-how-does-it-work.

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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants