Skip to content

Commit

Permalink
Always build Qt host tools with host CPU arch (google#1122)
Browse files Browse the repository at this point in the history
This follows up to my previous commit [1], which enabled build_qt.py to
build Qt6 for a CPU architecture other than the host architecture on
macOS environment.

Starting from Qt 6.8.0 it seems that Qt host tools need to be specified
via QT_HOST_PATH when running configure when cross compiling. To adopt
such a requirement, Qt6 will be built as follows with this commit.

 1. Build Qt host tools first with statically linking to Qt libraries.
 2. Build Qt for the target architecture with the above bootstrapping
    Qt host tools.
 3. Copy Qt host tools into third_party/qt/

Note that the above approach is not limited to macOS. In practice we can
now build Qt6 for non-host CPU architecture even on Windows.

There must be no behavior change in the final artifacts.

Closes google#1121.

 [1]: 2f68b50

PiperOrigin-RevId: 696781616
  • Loading branch information
yukawa authored Nov 15, 2024
1 parent 19f4dae commit a0fed62
Show file tree
Hide file tree
Showing 2 changed files with 284 additions and 67 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ MODULE.bazel.lock
# third_party dirs and cache dir checked out by update_deps.py
/src/third_party/ninja/
/src/third_party/qt/
/src/third_party/qt_host/
/src/third_party/qt_src/
/src/third_party/wix/
/src/third_party_cache/
Expand Down
Loading

0 comments on commit a0fed62

Please sign in to comment.