You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
iOS compiler stubs override environment-based minimum version specifications #133183
Python includes shims for compiler tools on iOS to match GNU conventions for compiler names (e.g., arm64-apple-ios-clang) to avoid encoding a user-specific location to a compiler in sysconfig, and to avoid issues with UNIX build tools that expect CC/CXX to be single arguments without spaces.
Using this approach arm64-apple-ios-clang expands internal as xcrun --sdk iphoneos clang -target arm64-apple-ios-clang
Unfortunately, Apple has 3 ways to define a minimum iOS version, in order of priority:
the IPHONEOS_DEPLOYMENT_TARGET=12.0 environment variable
the -mios-min-version=12.0 command line argument
a version number encoded in a -target arm64-apple-ios12.0-simulator argument
If you specify all three options, (1) will be ignored, and (2) will raise a warning if the version it specifies doesn't match the version specified by (3).
The problem arises if you specify -target arm64-apple-ios-simulator- which is what the shim currently encodes.
If the -target doesn't specify a version, this is interpreted as "no min version". An explicitly provided -mios-version-min definition will override this minimum without warning; but any IPHONEOS_DEPLOYMENT_VERSION value will be ignored.
Thus, using the compiler shims in an environment where IPHONEOS_DEPLOYMENT_VERSION is defined will result in this value being ignored unless the minimum version is also passed in as a -mios-version-min argument.
Activity
gh-133183: Include IPHONEOS_DEPLOYMENT_TARGET in iOS shim targets. (#…
pythongh-133183: Include IPHONEOS_DEPLOYMENT_TARGET in iOS shim targe…
[3.13] gh-133183: Include IPHONEOS_DEPLOYMENT_TARGET in iOS shim targ…
[3.10] pythongh-133183: Include IPHONEOS_DEPLOYMENT_TARGET in iOS shi…
[3.11] pythongh-133183: Include IPHONEOS_DEPLOYMENT_TARGET in iOS shi…
[3.12] pythongh-133183: Include IPHONEOS_DEPLOYMENT_TARGET in iOS shi…
[3.11] pythongh-133183: Include IPHONEOS_DEPLOYMENT_TARGET in iOS shi…
[3.12] pythongh-133183: Include IPHONEOS_DEPLOYMENT_TARGET in iOS shi…
[3.12] pythongh-133183: Include IPHONEOS_DEPLOYMENT_TARGET in iOS shi…
[3.11] pythongh-133183: Include IPHONEOS_DEPLOYMENT_TARGET in iOS shi…
[3.12] pythongh-133183: Include IPHONEOS_DEPLOYMENT_TARGET in iOS shi…