diff options
author | Michal Klocek <michal.klocek@qt.io> | 2021-05-23 17:39:28 +0200 |
---|---|---|
committer | Michal Klocek <michal.klocek@qt.io> | 2021-07-02 12:51:15 +0200 |
commit | 3a962d8a2d3b70639a195fe5fd442f6c653bbe8f (patch) | |
tree | fc29d1aa945b0ad90c9a558e6e3155f4c35f1f9a /tests | |
parent | 9e8f10247a5c5d433f5f983345f636fbedb26e2d (diff) |
Add cross compilation support to cmake builds
Add arm cross-compile basic support. CMake does not
support host builds. However we do host build with gn and
changing that would require an extra effort to keep all necessary
changes with Chromium upstream. Therefore let gn to perform
the host build for required tools and just feed gn with all the
build data.
Add new build steps:
* install gn into QT_HOST_PATH/libexec.
* run hostBuild project to get native architecture and compiler
* call PkgConfigHost to pass pkg-config paths to gn
* create wrapper script for host pkg-config to escape
yocto shell pkg config exports
This change also splits gn toolchain into 3 toolchains host,target,v8
Now hostBuild provides host and v8 toolchain in case of cross compile.
The build optimizations will follow in another patch.
Fix not existing 'boot2qt' condition and enables more test on QEMU.
Note this is tested only with yocto based images.
Pick-to: dev
Task-number: QTBUG-91760
Change-Id: Ic2bea12229acc71fbd36a848e9ed4fed7e14b485
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/auto/core/CMakeLists.txt | 5 | ||||
-rw-r--r-- | tests/auto/quick/CMakeLists.txt | 8 | ||||
-rw-r--r-- | tests/auto/widgets/CMakeLists.txt | 12 | ||||
-rw-r--r-- | tests/auto/widgets/proxypac/CMakeLists.txt | 4 |
4 files changed, 12 insertions, 17 deletions
diff --git a/tests/auto/core/CMakeLists.txt b/tests/auto/core/CMakeLists.txt index 0d2340188..ecb3b2cf9 100644 --- a/tests/auto/core/CMakeLists.txt +++ b/tests/auto/core/CMakeLists.txt @@ -2,9 +2,8 @@ add_subdirectory(qwebenginecookiestore) add_subdirectory(qwebenginesettings) add_subdirectory(qwebengineurlrequestinterceptor) add_subdirectory(origins) -if(NOT boot2qt) - add_subdirectory(devtools) -endif() +add_subdirectory(devtools) + if(QT_FEATURE_ssl) add_subdirectory(qwebengineclientcertificatestore) add_subdirectory(certificateerror) diff --git a/tests/auto/quick/CMakeLists.txt b/tests/auto/quick/CMakeLists.txt index 3ad3b37c8..1d38470b3 100644 --- a/tests/auto/quick/CMakeLists.txt +++ b/tests/auto/quick/CMakeLists.txt @@ -2,11 +2,9 @@ add_subdirectory(dialogs) add_subdirectory(publicapi) add_subdirectory(qquickwebenginedefaultsurfaceformat) add_subdirectory(qtbug-70248) -if(NOT boot2qt) - add_subdirectory(inspectorserver) - add_subdirectory(qmltests) - add_subdirectory(qquickwebengineview) -endif() +add_subdirectory(inspectorserver) +add_subdirectory(qmltests) +add_subdirectory(qquickwebengineview) if(QT_FEATURE_webenginequick_testsupport) add_subdirectory(qquickwebengineviewgraphics) endif() diff --git a/tests/auto/widgets/CMakeLists.txt b/tests/auto/widgets/CMakeLists.txt index f3e3edc90..bedb00f53 100644 --- a/tests/auto/widgets/CMakeLists.txt +++ b/tests/auto/widgets/CMakeLists.txt @@ -1,9 +1,7 @@ -if(NOT boot2qt) - add_subdirectory(defaultsurfaceformat) - add_subdirectory(qwebenginepage) - add_subdirectory(qwebengineprofile) - add_subdirectory(qwebengineview) -endif() +add_subdirectory(defaultsurfaceformat) +add_subdirectory(qwebenginepage) +add_subdirectory(qwebengineprofile) +add_subdirectory(qwebengineview) add_subdirectory(favicon) add_subdirectory(loadsignals) add_subdirectory(proxy) @@ -19,7 +17,7 @@ endif() if(NOT MACOS) add_subdirectory(touchinput) endif() -if(QT_FEATURE_accessibility AND NOT boot2qt) +if(QT_FEATURE_accessibility) add_subdirectory(accessibility) endif() if(QT_FEATURE_webengine_printing_and_pdf) diff --git a/tests/auto/widgets/proxypac/CMakeLists.txt b/tests/auto/widgets/proxypac/CMakeLists.txt index 084e55f81..1dd2c8bec 100644 --- a/tests/auto/widgets/proxypac/CMakeLists.txt +++ b/tests/auto/widgets/proxypac/CMakeLists.txt @@ -11,7 +11,7 @@ qt_internal_add_test(tst_proxypac_file if(WIN32) get_filename_component(SOURCE_DIR "${CMAKE_CURRENT_LIST_DIR}" REALPATH) set(fileEnvArg "--proxy-pac-url=\"file:///${SOURCE_DIR}/proxy.pac\"") -elseif(boot2qt) +elseif(LINUX AND CMAKE_CROSSCOMPILING) set(fileEnvArg "--single-process --no-sandbox --proxy-pac-url=\"file://${CMAKE_CURRENT_LIST_DIR}/proxy.pac\"") else() set(fileEnvArg "--proxy-pac-url=\"file://${CMAKE_CURRENT_LIST_DIR}/proxy.pac\"") @@ -29,7 +29,7 @@ qt_internal_add_test(tst_proxypac_qrc Test::HttpServer ) -if(boot2qt) +if(LINUX AND CMAKE_CROSSCOMPILING) set(qrcEnvArg "--single-process --no-sandbox --proxy-pac-url=\"qrc:///proxy.pac\"") else() set(qrcEnvArg "--proxy-pac-url=\"qrc:///proxy.pac\"") |