Skip to content
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

bpo-43052: Make dyld search work with SYSTEM_VERSION_COMPAT=1 #24324

Closed
wants to merge 3 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Make dyld search work with SYSTEM_VERSION_COMPAT=1
In macOS Big Sur, if the executable was compiled with `MACOSX_DEPLOYMENT_TARGET=10.15`
or below, then SYSTEM_VERSION_COMPAT=1 is the default which means that Big Sur
reports itself as 10.16 which means that `__builtin_available(macOS 11.0)` will not be triggered.

This can be observed by using the python 3.9.1 universal2 installer and using it on
x86_64 Big Sur or with Rossetta 2 on arm64 Big Sur. (Not an issue with native arm64
as that part is compiled with `MACOSX_DEPLOYMENT_TARGET=11.0`)
  • Loading branch information
isuruf authored Jan 25, 2021
commit afddfa8176cf8969055c6319504069b250723d3d
2 changes: 1 addition & 1 deletion Modules/_ctypes/callproc.c
Original file line number Diff line number Diff line change
Expand Up @@ -1449,7 +1449,7 @@ static PyObject *py_dyld_shared_cache_contains_path(PyObject *self, PyObject *ar
PyObject *name, *name2;
char *name_str;

if (__builtin_available(macOS 11.0, iOS 14.0, tvOS 14.0, watchOS 7.0, *)) {
if (__builtin_available(macOS 10.16, iOS 14.0, tvOS 14.0, watchOS 7.0, *)) {
int r;

if (!PyArg_ParseTuple(args, "O", &name))
Expand Down