8000 Check compatibility with macOS deployment target during JIT builds · Issue #134291 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

Check compatibility with macOS deployment target during JIT builds #134291

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
zanieb opened this issue May 19, 2025 · 0 comments
Open

Check compatibility with macOS deployment target during JIT builds #134291

zanieb opened this issue May 19, 2025 · 0 comments
Assignees
Labels
build The build process and cross-build OS-mac topic-JIT type-feature A feature request or enhancement

Comments

@zanieb
Copy link
Contributor
zanieb commented May 19, 2025

As with #100384, we should ensure that symbols use is guarded or the interpreter will crash at runtime on older macOS platforms.

There are a couple violations for a target of 10.15 (which we agreed on in #128155):

cpython-3.14> Python/jit.c:530:5: error: 'pthread_jit_write_protect_np' is only available on macOS 11.0 or newer [-Werror,-Wunguarded-availability-new]
cpython-3.14>   530 |     pthread_jit_write_protect_np(0);
cpython-3.14>       |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
cpython-3.14> /Applications/Xcode_15.2.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.2.sdk/usr/include/pthread.h:588:6: note: 'pthread_jit_write_protect_np' has been marked as being introduced in macOS 11.0 here, but the deployment target is macOS 10.15.0
cpython-3.14>   588 | void pthread_jit_write_protect_np(int enabled);
cpython-3.14>       |      ^
cpython-3.14> Python/jit.c:530:5: note: enclose 'pthread_jit_write_protect_np' in a __builtin_available check to silence this warning
cpython-3.14>   530 |     pthread_jit_write_protect_np(0);
cpython-3.14>       |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
cpython-3.14> Python/jit.c:570:5: error: 'pthread_jit_write_protect_np' is only available on macOS 11.0 or newer [-Werror,-Wunguarded-availability-new]
cpython-3.14>   570 |     pthread_jit_write_protect_np(1);
cpython-3.14>       |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
cpython-3.14> /Applications/Xcode_15.2.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.2.sdk/usr/include/pthread.h:588:6: note: 'pthread_jit_write_protect_np' has been marked as being introduced in macOS 11.0 here, but the deployment target is macOS 10.15.0
cpython-3.14>   588 | void pthread_jit_write_protect_np(int enabled);
cpython-3.14>       |      ^
cpython-3.14> Python/jit.c:570:5: note: enclose 'pthread_jit_write_protect_np' in a __builtin_available check to silence this warning
cpython-3.14>   570 |     pthread_jit_write_protect_np(1);
cpython-3.14>       |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
cpython-3.14> 2 errors generated.

Linked PRs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build The build process and cross-build OS-mac topic-JIT type-feature A feature request or enhancement
Projects
None yet
Development

No branches or pull requests

3 participants
0