Let build_qt.py build Qt for the host arch#1532
Open
yukawa wants to merge 1 commit into
Open
Conversation
On macOS the target CPU architecture of build_mozc.py has already been determined based on the host CPU architecture. On Windows, however, "x64" has been the default value of --target_arch option. As part of our on-going effort towards making it possible to build Mozc on Windows ARM64 machines (google#1296), this commit works on this discrepancy to keep our build instructions shorter and simpler. With this commit, Qt will be built for ARM64 by default when building on ARM64 Windows machines. Other minor improvements are: * --target_arch option is now restricted to choices=["x64", "arm64"]. * normalize_win_arch() is hardened to a whitelist: it maps the known inputs (amd64/x64/arm64) to their canonical names and raises ValueError on any unsupported architecture instead of silently passing it through. If you happen to have specified "--target_arch=amd64", please update it to "--target_arch=x64". Other than that, there should be no impact on existing CI instances.
c7e5acf to
2a1323c
Compare
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.
Description
On macOS the target CPU architecture of
build_mozc.pyhas already been determined based on the host CPU architecture. On Windows, however,x64has been the default value of--target_archoption.As part of our on-going effort towards making it possible to build Mozc on Windows ARM64 machines (#1296), this commit works on this discrepancy to keep our build instructions shorter and simpler. With this commit, Qt will be built for ARM64 by default when building on ARM64 Windows machines.
Other minor improvements are:
--target_archoption is now restricted tochoices=["x64", "arm64"].normalize_win_arch()is hardened to a whitelist: it maps the known inputs (amd64/x64/arm64) to their canonical names and raisesValueErroron any unsupported architecture instead of silently passing it through.If you happen to have specified
--target_arch=amd64, please update it to--target_arch=x64. Other than that, there should be no impact on existing CI instances.Issue IDs
Steps to test new behaviors (if any)
python .\build_tools\build_qt.py --debug --release --confirm_license