Skip to content

[build] Raise macOS minimum deployment target to 13.0#794

Open
hughperkins wants to merge 2 commits into
mainfrom
hp/mac-min-macos-13
Open

[build] Raise macOS minimum deployment target to 13.0#794
hughperkins wants to merge 2 commits into
mainfrom
hp/mac-min-macos-13

Conversation

@hughperkins

Copy link
Copy Markdown
Collaborator

Stamp the wheel as macosx_13_0_arm64 instead of macosx_11_0_arm64, and pin CMAKE_OSX_DEPLOYMENT_TARGET=13.0 (set before project()) so the compiled binary's minos matches the advertised wheel tag.

The old -DOSX_DEPLOYMENT_TARGET=11.0 define was an unused preprocessor macro that never set the real deployment target; it is replaced by the CMake variable.

Issue: #

Brief Summary

copilot:summary

Walkthrough

copilot:walkthrough

Stamp the wheel as macosx_13_0_arm64 instead of macosx_11_0_arm64, and pin
CMAKE_OSX_DEPLOYMENT_TARGET=13.0 (set before project()) so the compiled
binary's minos matches the advertised wheel tag.

The old -DOSX_DEPLOYMENT_TARGET=11.0 define was an unused preprocessor macro
that never set the real deployment target; it is replaced by the CMake
variable.
@hughperkins
hughperkins marked this pull request as ready for review July 20, 2026 13:44
@hughperkins

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 6e0b87b58c

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread CMakeLists.txt Outdated
Comment on lines +11 to +12
if(NOT DEFINED CMAKE_OSX_DEPLOYMENT_TARGET)
set(CMAKE_OSX_DEPLOYMENT_TARGET "13.0" CACHE STRING "Minimum macOS deployment target")

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Honor MACOSX_DEPLOYMENT_TARGET before defaulting

When a macOS builder sets the standard MACOSX_DEPLOYMENT_TARGET environment variable, this new guard still creates an explicit CMAKE_OSX_DEPLOYMENT_TARGET=13.0 cache entry before project(), so CMake never gets to initialize the variable from the env value. That makes the advertised override path silently ignored for builds that need to raise or lower the deployment target; check $ENV{MACOSX_DEPLOYMENT_TARGET} before setting the default, or seed the cache from it.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Opus here: Good catch, fixed in a684072. The guard now also requires $ENV{MACOSX_DEPLOYMENT_TARGET} to be empty before applying the 13.0 default, so CMake gets to seed CMAKE_OSX_DEPLOYMENT_TARGET from the env var during project() as intended. Verified against Darwin-Initialize.cmake: the env seeding is a non-FORCE cache set, so it was indeed a no-op once our pre-project() entry existed.

@github-actions

Copy link
Copy Markdown

@github-actions

Copy link
Copy Markdown

The previous guard only checked NOT DEFINED CMAKE_OSX_DEPLOYMENT_TARGET, so
creating the cache entry before project() preempted CMake's env-var seeding
(a non-FORCE cache set in Darwin-Initialize.cmake is a no-op once the entry
exists). That silently ignored a builder-provided MACOSX_DEPLOYMENT_TARGET.

Also require the env var to be empty before applying our 13.0 default, so an
explicit -D or the standard env var both take effect as documented.
@hughperkins

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Another round soon, please!

Reviewed commit: a6840725bc

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

@hughperkins

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. What shall we delve into next?

Reviewed commit: a6840725bc

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

@hughperkins hughperkins added the awaiting-ci-to-pass awaiting-ci-to-pass label Jul 20, 2026
@github-actions

Copy link
Copy Markdown

@github-actions

Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

awaiting-ci-to-pass awaiting-ci-to-pass

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant