Add instructions for Windows 10 on Arm config

Task-number: QTQAINFRA-3966
Change-Id: Ib8ac80a5b8aa5c88d9e5d0eaad9ba550cc2442f8
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Fathi Boudra
This commit is contained in:
Simo Fält 2021-01-12 11:19:30 +02:00
parent 3886db82c6
commit 3969ef40cc
5 changed files with 69 additions and 5 deletions

View File

@ -441,6 +441,15 @@ function(qt_auto_detect_pch)
option(BUILD_WITH_PCH "Build Qt using precompiled headers?" "${default_value}") option(BUILD_WITH_PCH "Build Qt using precompiled headers?" "${default_value}")
endfunction() endfunction()
function(qt_auto_detect_win32_arm)
if("${QT_QMAKE_TARGET_MKSPEC}" STREQUAL "win32-arm64-msvc")
set(CMAKE_SYSTEM_NAME "Windows" CACHE STRING "")
set(CMAKE_SYSTEM_VERSION "10" CACHE STRING "")
set(CMAKE_SYSTEM_PROCESSOR "arm64" CACHE STRING "")
endif()
endfunction()
qt_auto_detect_cmake_generator() qt_auto_detect_cmake_generator()
qt_auto_detect_cyclic_toolchain() qt_auto_detect_cyclic_toolchain()
qt_auto_detect_cmake_config() qt_auto_detect_cmake_config()
@ -451,3 +460,4 @@ qt_auto_detect_android()
qt_auto_detect_vpckg() qt_auto_detect_vpckg()
qt_auto_detect_pch() qt_auto_detect_pch()
qt_auto_detect_wasm() qt_auto_detect_wasm()
qt_auto_detect_win32_arm()

View File

@ -46,6 +46,12 @@ function(qt_internal_create_toolchain_file)
"set(VCPKG_TARGET_TRIPLET \"${VCPKG_TARGET_TRIPLET}\" CACHE STRING \"\")") "set(VCPKG_TARGET_TRIPLET \"${VCPKG_TARGET_TRIPLET}\" CACHE STRING \"\")")
endif() endif()
if(CMAKE_SYSTEM_NAME STREQUAL "Windows" AND CMAKE_SYSTEM_PROCESSOR STREQUAL "arm64" AND CMAKE_SYSTEM_VERSION STREQUAL "10")
list(APPEND init_platform "set(CMAKE_SYSTEM_NAME Windows CACHE STRING \"\")")
list(APPEND init_platform "set(CMAKE_SYSTEM_VERSION 10 CACHE STRING \"\")")
list(APPEND init_platform "set(CMAKE_SYSTEM_PROCESSOR arm64 CACHE STRING \"\")")
endif()
# By default we don't want to allow mixing compilers for building different repositories, so we # By default we don't want to allow mixing compilers for building different repositories, so we
# embed the initially chosen compilers into the toolchain. # embed the initially chosen compilers into the toolchain.
# This is because on Windows compilers aren't easily mixed. # This is because on Windows compilers aren't easily mixed.

View File

@ -21,6 +21,9 @@ instructions:
- condition: property - condition: property
property: target.osVersion property: target.osVersion
not_in_values: [QEMU, WebAssembly] not_in_values: [QEMU, WebAssembly]
- condition: property
property: features
not_contains_value: "TargetBuildOnly"
- type: Group - type: Group
instructions: instructions:
- !include "{{qt/qtbase}}/cmake_cross_compilation_module_build_instructions.yaml" - !include "{{qt/qtbase}}/cmake_cross_compilation_module_build_instructions.yaml"
@ -33,6 +36,16 @@ instructions:
# We don't currently build tests for Android other than qtbase repo # We don't currently build tests for Android other than qtbase repo
in_values: [QEMU] in_values: [QEMU]
enable_if: enable_if:
condition: property condition: or
property: target.osVersion conditions:
in_values: [IOS_ANY, Android_ANY, QEMU, QNX_710, WebAssembly] - condition: property
property: target.osVersion
in_values: [IOS_ANY, Android_ANY, QEMU, QNX_710, WebAssembly]
- condition: and
conditions:
- condition: property
property: host.compiler
equals_value: MSVC2019
- condition: property
property: target.arch
equals_value: ARM64

View File

@ -14,6 +14,9 @@ instructions:
- condition: property - condition: property
property: target.osVersion property: target.osVersion
not_in_values: [QEMU, WebAssembly] not_in_values: [QEMU, WebAssembly]
- condition: property
property: features
not_contains_value: "TargetBuildOnly"
- type: Group - type: Group
instructions: instructions:
- !include "{{qt/qtbase}}/cmake_cross_compilation_qtbase_build_instructions.yaml" - !include "{{qt/qtbase}}/cmake_cross_compilation_qtbase_build_instructions.yaml"
@ -25,6 +28,16 @@ instructions:
property: target.osVersion property: target.osVersion
in_values: [Android_ANY, QEMU] in_values: [Android_ANY, QEMU]
enable_if: enable_if:
condition: property condition: or
conditions:
- condition: property
property: target.osVersion property: target.osVersion
in_values: [IOS_ANY, Android_ANY, QEMU, QNX_710, WebAssembly] in_values: [IOS_ANY, Android_ANY, QEMU, QNX_710, WebAssembly]
- condition: and
conditions:
- condition: property
property: host.compiler
equals_value: MSVC2019
- condition: property
property: target.arch
equals_value: ARM64

View File

@ -93,6 +93,13 @@ instructions:
- condition: property - condition: property
property: host.arch property: host.arch
equals_property: X86_64 equals_property: X86_64
- type: EnvironmentVariable
variableName: TARGET_ARCHITECTURE
variableValue: x64_arm64
enable_if:
condition: property
property: target.arch
equals_value: ARM64
- type: EnvironmentVariable - type: EnvironmentVariable
# HACK. Overwrite TARGET_ARCHITECTURE as we do not use standard MSVC cross # HACK. Overwrite TARGET_ARCHITECTURE as we do not use standard MSVC cross
# compilation targets here. The target architecture will be detected by Qt. # compilation targets here. The target architecture will be detected by Qt.
@ -259,6 +266,22 @@ instructions:
property: target.osVersion property: target.osVersion
equals_value: QEMU equals_value: QEMU
# Windows on Arm, cross-compilation with MSVC
- type: Group
enable_if:
condition: and
conditions:
- condition: property
property: host.compiler
equals_value: MSVC2019
- condition: property
property: target.arch
equals_value: ARM64
instructions:
- type: EnvironmentVariable
variableName: TARGET_ENV_PREFIX
variableValue: "c:\\users\\qt\\prefix.bat"
# QNX variables # QNX variables
- type: Group - type: Group
enable_if: enable_if:
@ -292,4 +315,3 @@ instructions:
property: host.os property: host.os
equals_value: Linux equals_value: Linux