From 238400b22f3b327c05a51a913b279d4bf37f4adf Mon Sep 17 00:00:00 2001 From: Alexey Edelev Date: Thu, 7 Aug 2025 17:25:22 +0200 Subject: [PATCH] Introduce UseToolchainFromTargetDir feature for tests that are built at test stage The feature allows controlling which toolchain should be used when building tests. Since WoA supposed to build tests using the crosscompiled Qt in native host environment, this option allows preparing the correct build environment and use the crosscompiled 'target' Qt. Drive-by change the way prefix.bat is called for native WoA configuration. Pick-to: 6.10 Change-Id: Ifec7593b4216ee2e2ffe185ae0dc0559d501762b Reviewed-by: Alexandru Croitor --- .../cmake_build_tests_in_test_stage.yaml | 22 ++++++++++++++----- coin/instructions/prepare_building_env.yaml | 10 ++++----- 2 files changed, 21 insertions(+), 11 deletions(-) diff --git a/coin/instructions/cmake_build_tests_in_test_stage.yaml b/coin/instructions/cmake_build_tests_in_test_stage.yaml index 420b4331f57..2f4e62b989e 100644 --- a/coin/instructions/cmake_build_tests_in_test_stage.yaml +++ b/coin/instructions/cmake_build_tests_in_test_stage.yaml @@ -8,16 +8,26 @@ instructions: instructions: - !include "{{qt/qtbase}}/cmake_build_and_upload_test_artifacts_host.yaml" disable_if: - condition: property - property: target.osVersion - in_values: [Android_ANY, QEMU, IOS_ANY, QNX_710, WebAssembly, INTEGRITY, VxWorks] + condition: or + conditions: + - condition: property + property: target.osVersion + in_values: [Android_ANY, QEMU, IOS_ANY, QNX_710, WebAssembly, INTEGRITY, VxWorks] + - condition: property + property: features + contains_value: UseToolchainFromTargetDir - type: Group instructions: - !include "{{qt/qtbase}}/cmake_build_and_upload_test_artifacts_target.yaml" enable_if: - condition: property - property: target.osVersion - in_values: [Android_ANY, QEMU, IOS_ANY, QNX_710, WebAssembly, INTEGRITY, VxWorks] + condition: or + conditions: + - condition: property + property: target.osVersion + in_values: [Android_ANY, QEMU, IOS_ANY, QNX_710, WebAssembly, INTEGRITY, VxWorks] + - condition: property + property: features + contains_value: UseToolchainFromTargetDir enable_if: condition: property property: features diff --git a/coin/instructions/prepare_building_env.yaml b/coin/instructions/prepare_building_env.yaml index 03b05ddf7ea..cda46145e01 100644 --- a/coin/instructions/prepare_building_env.yaml +++ b/coin/instructions/prepare_building_env.yaml @@ -202,8 +202,8 @@ instructions: property: target.arch in_values: ["AARCH64", "ARM64"] - condition: property - property: host - equals_property: target + property: host.arch + in_values: ["AARCH64", "ARM64"] - type: EnvironmentVariable # HACK. Overwrite TARGET_ARCHITECTURE as we do not use standard MSVC cross # compilation targets here. The target architecture will be detected by Qt. @@ -398,11 +398,11 @@ instructions: condition: and conditions: - condition: property - property: target.os + property: host.os equals_value: Windows - condition: property - property: target.arch - not_equals_property: host.arch + property: host.compiler + contains_value: MSVC instructions: - type: EnvironmentVariable variableName: TARGET_ENV_PREFIX