Files
qt5/coin/provisioning/common/windows/libclang.ps1
Luca Di Sera 1b97371ea0 Update QDoc libclang to 17.0.6
The version variable that is used to define the packages to download was
updated to reflect the new version.

A new case was added for the new "Debian11" on "arm64" package which was
not a provisioned package on older version but is now provided.
As "Debian11" was not currenly loading "libclang.sh", a new script that
performs this process was added to
"coin/provisioning/qtci-linux-Debian-11.6-aarch64".

The newly sourced "libclang.sh" includes
"coin/provisiong/common/unix/common.sourced.sh", which sets up certain
common variables such as the used architecture and the platform id.
When "common.sourced.sh" sets "PROVISION_ARCH", that contains the
current platform architecture, it fails if the platform architecture is
not supported.

For "Debian11" on "arm64", the architecture, as reported by "uname -m"
is "aarch64", which is equivalent to "arm64".
"aarch64" was not handled by the script, so that a platform with that
architecture would result in a fail when sourcing "common.sourced.sh".

To avoid the failure, the case that sets "PROVISIONING_ARCH" to "arm64"
will not trigger when the reported architecture is "aarch64".

The specialized RedHat case was update to work specifically for version
9, to use the new specifically built package for Rhel9.2.

The default case, previously using an "ubuntu20.04" package, was
modified to use a "Rhel8.8" package.
A package for "Ubuntu20.04" is not currently provided anymore as the
platform was removed from CI and the new "22.04" package is not
compatible with all the platforms that would use it.

In particular, the new packages are built on a too new glibc, which will
then fail to link, due to undefined symbols in the produced Clang
libraries, when used on older-glibc platforms such as "OpenSuse15" and
"Rhel8.8".

The "Rhel8.8" package was specifically used as the platform for the
default package as it ships the older glibc, "2.28", of the supported
platforms, which should ensure that it works on the older-version platforms.

The "sha1" variables for cached downloads was updated to reflect the new
packages.

For provisioning on windows, the version variable and the sha1 variables
were updated to reflect the new version and the new packages, respectively.

Pick-to: 6.7
Task-number: QTBUG-111580
Task-number: QTBUG-121548
Change-Id: Ie7c1a8d8fe9114912d53a87f70ebfa00341a9d8a
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
(cherry picked from commit 9975595a5e)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-07-13 23:35:00 +00:00

77 lines
2.0 KiB
PowerShell

param(
[Int32]$archVer=32,
[string]$toolchain="vs2019",
[bool]$setDefault=$true
)
. "$PSScriptRoot\helpers.ps1"
$libclang_version="17.0.6"
Write-Output "libClang = $libclang_version" >> ~/versions.txt
# PySide versions following 5.6 use a C++ parser based on Clang (http://clang.org/).
# The Clang library (C-bindings), version 3.9 or higher is required for building.
# Starting from Qt 5.11 QDoc requires Clang to parse C++
$baseDestination = "C:\Utils\libclang-" + $libclang_version + "-" + $toolchain
function install() {
param(
[string]$sha1=$1,
[string]$destination=$2
)
$zip = "c:\users\qt\downloads\libclang.7z"
$script:OfficialUrl = "https://download.qt.io/development_releases/prebuilt/libclang/qt/libclang-release_$libclang_version-based-windows-$toolchain`_$archVer.7z"
$script:CachedUrl = "http://ci-files01-hki.ci.qt.io/input/libclang/qt/libclang-release_$libclang_version-based-windows-$toolchain`_$archVer.7z"
Download $OfficialUrl $CachedUrl $zip
Verify-Checksum $zip $sha1
Extract-7Zip $zip C:\Utils\
Rename-Item C:\Utils\libclang $destination
Remove "$zip"
}
$toolchainSuffix = ""
if ( $toolchain -eq "vs2019" ) {
if ( $archVer -eq 64 ) {
$sha1 = "7e3e474081d2e1d5d95c9743532de01b8e59b9aa"
}
else {
$sha1 = ""
}
$toolchainSuffix = "msvc"
}
if ( $toolchain -eq "mingw" ) {
if ( $archVer -eq 64 ) {
$sha1 = "b9e65f617cd8d6e8fb8ae734383f03f6a7b202ed"
}
else {
$sha1 = ""
}
$toolchainSuffix = "mingw"
}
if ( $toolchain -eq "llvm-mingw" ) {
if ( $archVer -eq 64 ) {
$sha1 = "1844f107d067b69deabf375fc024848c1c8b015d"
}
else {
$sha1 = ""
}
# Due to COIN-1137 forced to use a '_' instead of '-'
$toolchainSuffix = "llvm_mingw"
}
install $sha1 $baseDestination-$archVer
if ( $setDefault ) {
Set-EnvironmentVariable "LLVM_INSTALL_DIR" ($baseDestination + "-$archVer")
}
Set-EnvironmentVariable ("LLVM_INSTALL_DIR_${toolchainSuffix}") ($baseDestination + "-$archVer")