Skip to content

Let build_qt.py build Qt for the host arch#1532

Open
yukawa wants to merge 1 commit into
google:masterfrom
ciceroaware:issue_1296_build_qt_default_arch
Open

Let build_qt.py build Qt for the host arch#1532
yukawa wants to merge 1 commit into
google:masterfrom
ciceroaware:issue_1296_build_qt_default_arch

Conversation

@yukawa

@yukawa yukawa commented Jun 27, 2026

Copy link
Copy Markdown
Collaborator

Description

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 (#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.

Issue IDs

Steps to test new behaviors (if any)

  • OS: Windows 25H2 ARM64
  • Steps:
    1. python .\build_tools\build_qt.py --debug --release --confirm_license
    2. Confirm that the Qt binaries are built for ARM64

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.
@yukawa yukawa force-pushed the issue_1296_build_qt_default_arch branch from c7e5acf to 2a1323c Compare June 27, 2026 17:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant