gh-156115: Use the simulator deployment-target flag for iOS simulator builds - #156116
Open
clementperon wants to merge 1 commit into
Open
gh-156115: Use the simulator deployment-target flag for iOS simulator builds#156116clementperon wants to merge 1 commit into
clementperon wants to merge 1 commit into
Conversation
-mios-version-min names the device platform, so against the simulator SDK the linker rejects every dylib it resolves there. Configuring for the simulator still exits 0, but conftest links fail and iconv, sqlite3 and zlib features are misdetected as absent; a build with a library on LDFLAGS before the first compiler check fails outright instead. The device/simulator split is already known from the host triple, so select the flag from it.
clementperon
requested review from
AA-Turner,
corona10,
emmatyping,
erlend-aasland and
itamaro
as code owners
August 20, 2026 14:02
3 tasks
clementperon
added a commit
to clementperon/xbmc
that referenced
this pull request
Aug 20, 2026
CPython appends -mios-version-min - the device flag - to every iOS build. Against the simulator SDK the linker rejects the dylibs it resolves there, and the first configure check that links one fails, taking the depends build with it. The local patch faked ac_sys_system=iOS by deleting CPython's host parsing, because config.site.in pinned every package to the tree's darwin triplet. Python now configures against its own iOS triplet, so CPython derives ac_sys_system, the deployment target and the device/simulator split itself, and the 76 lines that deleted that logic are gone. What is left matches three patches under review upstream, so all three can be dropped when python is next bumped: python/cpython#156110 python/cpython#156116 python/cpython#156113 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
clementperon
added a commit
to clementperon/xbmc
that referenced
this pull request
Aug 20, 2026
CPython appends -mios-version-min - the device flag - to every iOS build. Against the simulator SDK the linker rejects the dylibs it resolves there, and the first configure check that links one fails, taking the depends build with it. The local patch faked ac_sys_system=iOS by deleting CPython's host parsing, because config.site.in pinned every package to the tree's darwin triplet. Python now configures against its own iOS triplet, so CPython derives ac_sys_system, the deployment target and the device/simulator split itself, and the 76 lines that deleted that logic are gone. What is left matches three patches under review upstream, so all three can be dropped when python is next bumped: python/cpython#156110 python/cpython#156116 python/cpython#156113 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
clementperon
added a commit
to clementperon/xbmc
that referenced
this pull request
Aug 20, 2026
CPython appends -mios-version-min - the device flag - to every iOS build. Against the simulator SDK the linker rejects the dylibs it resolves there, and the first configure check that links one fails, taking the depends build with it. The local patch faked ac_sys_system=iOS by deleting CPython's host parsing, because config.site.in pinned every package to the tree's darwin triplet. Python now configures against its own iOS triplet, so CPython derives ac_sys_system, the deployment target and the device/simulator split itself, and the 76 lines that deleted that logic are gone. What is left matches three patches under review upstream, so all three can be dropped when python is next bumped: python/cpython#156110 python/cpython#156116 python/cpython#156113 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
configureappends-mios-version-minto CFLAGS/LDFLAGS for every iOS build. That is the device flag (an alias for-miphoneos-version-min), so against the simulator SDK the linker rejects everything it resolves there:_host_deviceis already derived from the host triple atconfigure.ac:794, so this selects the flag from it:-mios-simulator-version-minfor the simulator,-mios-version-minunchanged for the device.The wrappers in
Platforms/Apple/iOS/Resources/binhide this, because they pass--target=arm64-apple-ios-simulatorand that pins the platform regardless of the later flag. Driving clang directly with-isysroot, as a cross-compiling build system typically does, hits it.It is a quiet failure rather than a loud one. On unpatched
main, a simulator configure still exits 0, butconfig.logholds 17 failed conftest links and features come out misdetected:With a library on
LDFLAGSbefore the first compiler check it fails outright withconfigure: error: C compiler cannot create executables.Verified on macOS/arm64: the simulator build emits
-mios-simulator-version-min=12.0and detects all four features; the device build still emits-mios-version-min=12.0and is otherwise unchanged.