Repository navigation
Conversation
…r when cross-compiling
m-kuhn
reviewed
Nov 4, 2026
m-kuhn
reviewed
Nov 4, 2026
m-kuhn
left a comment
Contributor
There was a problem hiding this comment.
LGTM so far, before merging please add tests for (macos) cross builds, probably as replacement for the existing intel builds
This was referenced Nov 4, 2026
Collaborator
Author
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.
Allows building
x64-osx-dynamicpackages on an arm64 macOS machine (--host-triplet=arm64-osx-dynamic --triplet=x64-osx-dynamic), running the x86_64 target tools under Rosetta. The motivation is building qtwebengine + py-pyqt6 + py-pyqt6-webengine without an Intel runner.On macOS, vcpkg's toolchain sets
CMAKE_CROSSCOMPILING=OFFfor arm64 -> x64 (the target binaries can run), butVCPKG_CROSSCOMPILINGis still on. That mismatch breaks several ports here:configurerefuses--host=x86_64-apple-darwin --build=aarch64-apple-darwin("cross build not supported"). On a macOS host the port now configures as a native build.py-*ports run the target python, but gpep517, installer, setuptools and wheel are host dependencies, so the build fails withNo module named gpep517. In a cross build the host site-packages (pure Python only) is appended toPYTHONPATH. This only works because the target python can run on the build machine, so it is not a general answer to Crosscompiling python extensions using host python #39.pipe2, links it weakly and calls it unguarded, soos.pipe()andsubprocesssegfault.ac_cv_func_pipe2=noon macOS avoids it. This is not cross-specific; it affects native builds with a newer SDK than the running OS.qmake, which doesn't exist in a cross build (qtbase builds no host tools). New helpervcpkg_python_get_qmakereturns the installed qmake if present, otherwise a wrapper that runs the host qmake with the targetqt.conf, the same wayvcpkg_qmake_configuredoes.The last commit bumps
port-versionof the touched ports.Tested on macOS 26.6 / Xcode 27.2 on an arm64 host, vcpkg master
afa249f12, release-only triplets (x64-osx-dynamic-releasetarget,arm64-osx-dynamic-releasehost).qtwebengine[webengine,webchannel,pdf](3.7 h, no changes to its port), py-pyqt6 (qtdeclarative, qtwebengine) and py-pyqt6-webengine all built. All 346 Mach-O files in the target tree are x86_64-only with no build-directory paths in load commands,PyQt6.QtWebEngine{Core,Widgets,Quick}import underarch -x86_64, and aQWebEnginePageloads a page and evaluates JavaScript.Not tested: this repository's CI (there is no cross job), debug builds, other ports with C extensions (numpy, scipy, ...), non-macOS cross builds. Native builds should be unaffected apart from the pipe2 change, but I have not re-run them with these changes. I can add a cross job to
macos.ymlif wanted.