mirror of
git://code.qt.io/qt/qt5.git
synced 2026-02-01 19:36:04 +08:00
Up to now we were always matching host architecture for clang version to install. It is not good enough as in some cases (all?) we build qdoc, which depends on clang, as 32 bit app, that can not link to 64 bit clang. Change-Id: I7b635f38821533da32d721e5e55f0067d4d0f62e Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
43 lines
1.5 KiB
PowerShell
43 lines
1.5 KiB
PowerShell
param([Int32]$archVer=32)
|
|
. "$PSScriptRoot\..\common\helpers.ps1"
|
|
|
|
# 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++
|
|
|
|
Get-Content "$PSScriptRoot\..\common\sw_versions.txt" | Foreach-Object {
|
|
$var = $_.Split('=')
|
|
New-Variable -Name $var[0] -Value $var[1]
|
|
$libclang_version = $libclang_version -replace '["."]'
|
|
}
|
|
|
|
$zip = "c:\users\qt\downloads\libclang.7z"
|
|
$baseDestination = "C:\Utils\libclang-" + $libclang_version
|
|
if ( $archVer -eq 64 ) {
|
|
$sha1 = "dc42beb0efff130c4d7dfef3c97adf26f1ab04e0"
|
|
$url = "https://download.qt.io/development_releases/prebuilt/libclang/libclang-release_$libclang_version-windows-vs2015_64.7z"
|
|
$destination = $baseDestination + "-64"
|
|
|
|
Download $url $url $zip
|
|
Verify-Checksum $zip $sha1
|
|
|
|
C:\Utils\sevenzip\7z.exe x $zip -oC:\Utils\
|
|
Rename-Item C:\Utils\libclang $destination
|
|
del $zip
|
|
}
|
|
|
|
$sha1 = "64e826c00ae632fbb28655e6e1fa9194980e1205"
|
|
$url = "https://download.qt.io/development_releases/prebuilt/libclang/libclang-release_$libclang_version-windows-vs2015_32.7z"
|
|
$destination = $baseDestination + "-32"
|
|
|
|
Download $url $url $zip
|
|
Verify-Checksum $zip $sha1
|
|
|
|
C:\Utils\sevenzip\7z.exe x $zip -oC:\Utils\
|
|
Rename-Item C:\Utils\libclang $destination
|
|
del $zip
|
|
|
|
[Environment]::SetEnvironmentVariable("LLVM_INSTALL_DIR", $baseDestination + "-_ARCH_", [EnvironmentVariableTarget]::Machine)
|
|
echo "libClang = $libclang_version" >> ~/versions.txt
|