Description
Attempting to build QtWebEngine 5.15.7 on macOS for Apple Silicon (ARM 64-bit) encounters an error:
ERROR at //build/config/mac/BUILD.gn:44:5: Assertion failed. assert(false, "unknown current_cpu $current_cpu") ^----- unknown current_cpu arm See //build/config/BUILDCONFIG.gn:411:23: which caused the file to be included. _linker_configs = [ "//build/config/mac:strip_all" ] ^----------------------------- Project ERROR: GN run 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?
Attachments
Issue Links
- is duplicated by
-
QTBUG-98815 Webengine failed with macOS 12 ARM64: unknown current_cpu arm
-
- Closed
-