-
-
Notifications
You must be signed in to change notification settings - Fork 31.5k
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
platform_triplet.c uses possibly undefined TARGET_OS_* macros #117886
Comments
jmroot
added a commit
to jmroot/cpython
that referenced
this issue
Apr 15, 2024
Older macOS SDKs don't define any of these, and some clang versions will error if you use them without first checking if they are defined.
@jmroot, Out of interest: How old are the old SDKs you mention? And which clang versions are problematic? |
We got a downstream report from a user on 10.11. AFAIK the very latest clang versions default to |
This was referenced Apr 18, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Bug report
Bug description:
The symptom is:
which of course leads to all kinds of problems later in the build. The problem is that
platform_triplet.c
usesTARGET_OS_IOS
,TARGET_OS_SIMULATOR
andTARGET_OS_OSX
without checking if they are defined. While this is valid according to the C standard with undefined macros evaluating to 0, it's a problem for two reasons: Older macOS SDKs don't define these, and the code assumes thatTARGET_OS_OSX
being false means it's not building for macOS, and secondly some clang versions will error if you use any macro starting withTARGET_OS_
without checking if it is defined.CPython versions tested on:
3.13
Operating systems tested on:
macOS
Linked PRs
The text was updated successfully, but these errors were encountered: