Build arm64 triplet only where we need it

The triplet it not used on every x86_64 windows VM. Build it only
on windows 11_23_H2-x86_64 where we crosscompile Qt.

Change-Id: I5bfd852ac0cdde8d8f1f7b4b46d208f6dc221162
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
This commit is contained in:
Alexey Edelev
2024-07-25 16:49:50 +02:00
parent bdbd24a4a3
commit b5fa5d0c2b
2 changed files with 8 additions and 7 deletions

View File

@@ -1,5 +1,8 @@
# Copyright (C) 2023 The Qt Company Ltd.
# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
param([string]$arch="x64")
. "$PSScriptRoot\helpers.ps1"
Write-Host "Installing vcpkg ports"
@@ -9,18 +12,15 @@ $vcpkgRoot = "$env:VCPKG_ROOT"
Set-Location -Path "$PSScriptRoot\vcpkg"
Copy-Item "$PSScriptRoot\..\shared\vcpkg-configuration.json" -Destination "$PSScriptRoot\vcpkg"
Run-Executable "$vcpkgExe" "install --triplet x64-windows-qt --x-install-root x64-windows-qt-tmp --debug"
Run-Executable "$vcpkgExe" "install --triplet arm64-windows-qt --x-install-root arm64-windows-qt-tmp --debug"
Run-Executable "$vcpkgExe" "install --triplet $arch-windows-qt --x-install-root $arch-windows-qt-tmp --debug"
New-Item -Path "$vcpkgRoot" -Name "installed" -ItemType "directory" -Force
Copy-Item -Path "x64-windows-qt-tmp\*" -Destination "$vcpkgRoot\installed" -Recurse -Force
Copy-Item -Path "arm64-windows-qt-tmp\*" -Destination "$vcpkgRoot\installed" -Recurse -Force
Copy-Item -Path "$arch-windows-qt-tmp\*" -Destination "$vcpkgRoot\installed" -Recurse -Force
$versions = jq.exe -r '.overrides[] | \"vcpkg \(.name) = \(.version)\"' vcpkg.json
$versions = $versions.Replace("vcpkg", "`nvcpkg")
Write-Output "$versions" >> ~/versions.txt
Remove-Item -Path "x64-windows-qt-tmp" -Recurse -Force
Remove-Item -Path "arm64-windows-qt-tmp" -Recurse -Force
Remove-Item -Path "$arch-windows-qt-tmp" -Recurse -Force
Set-Location "$PSScriptRoot"

View File

@@ -1 +1,2 @@
. "$PSScriptRoot\..\common\windows\install-vcpkg-ports.ps1"
. "$PSScriptRoot\..\common\windows\install-vcpkg-ports.ps1" -arch x64
. "$PSScriptRoot\..\common\windows\install-vcpkg-ports.ps1" -arch arm64