Attempting to build QtWebEngine 5.15.7 on macOS for Apple Silicon (ARM 64-bit) encounters an error:
This appears to be caused by GN setting the host_cpu variable to arm rather than arm64; by default, host_cpu is used to set target_cpu, which in turn is used to set current_cpu (see src/3rdparty/chromium/build/config/BUILDCONFIG.gn). But src/3rdparty/chromium/build/config/mac/BUILD.gn only recognizes current_cpu as possibly being set to arm64, and not arm.
Newer versions of GN, including the version(s) present on branches of the qtwebengine-chromium repository newer than the 87-based branch, correctly set host_cpu to arm64 on macOS ARM64. Commit for the very small code change that corrected the behavior: https://gn.googlesource.com/gn/+/f45a703d8fd97817529e00a70ca4bae75abec3e3%5E%21/#F0
Can this change please be backported/cherry-picked to the 87-based branch of qtwebengine-chromium for inclusion in future QtWebEngine 5.15.x releases?