aboutsummaryrefslogtreecommitdiffstats
path: root/coin/provisioning/common/windows
diff options
context:
space:
mode:
authorSimo Fält <simo.falt@qt.io>2020-08-12 13:32:29 +0300
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2020-12-30 16:59:27 +0000
commitc5378f6cd63ee5743646937f94d57f035e59f844 (patch)
tree769e9f020dad78923462af82775a72f6e887af89 /coin/provisioning/common/windows
parentbac86c9fba094b0224a5feeead355f50bc826874 (diff)
Provisioning: Install libClang 10 with dynamic libs
As Qt uses only static archives of libclang, we have to install dynamic version as an additional package. Libclang is required for example QtForPython. Change-Id: Ic9d70398113defe3561f261aee369b423c18686a Reviewed-by: Heikki Halmet <heikki.halmet@qt.io> (cherry picked from commit b792fd56dbf8d3ab1c8dd3d53b9afb86ca3555af) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'coin/provisioning/common/windows')
-rw-r--r--coin/provisioning/common/windows/libclang-v100-dyn.ps150
1 files changed, 50 insertions, 0 deletions
diff --git a/coin/provisioning/common/windows/libclang-v100-dyn.ps1 b/coin/provisioning/common/windows/libclang-v100-dyn.ps1
new file mode 100644
index 00000000..b0792a07
--- /dev/null
+++ b/coin/provisioning/common/windows/libclang-v100-dyn.ps1
@@ -0,0 +1,50 @@
+param(
+ [Int32]$archVer=32,
+ [string]$toolchain="vs2019",
+ [bool]$setDefault=$true
+)
+. "$PSScriptRoot\helpers.ps1"
+
+$libclang_version="10.0"
+Write-Output "libClang for QtForPython = $libclang_version" >> ~/versions.txt
+
+# PySide versions following Qt6 use a C++ parser based on Clang (http://clang.org/).
+# The Clang library (C-bindings), version 8.0 or higher is required for building.
+
+# Starting from Qt 5.11 QDoc requires Clang to parse C++
+
+$baseDestination = "C:\Utils\libclang-" + $libclang_version + "-dynlibs-" + $toolchain
+$libclang_version = $libclang_version -replace '["."]'
+
+function install() {
+
+ param(
+ [string]$sha1=$1,
+ [string]$destination=$2
+ )
+
+ $zip = "c:\users\qt\downloads\libclang-dyn.7z"
+
+ $script:OfficialUrl = "https://download.qt.io/development_releases/prebuilt/libclang/libclang-release_$libclang_version-based-windows-$toolchain`_$archVer.7z"
+ $script:CachedUrl = "http://ci-files01-hki.intra.qt.io/input/libclang/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-Item -Force -Path $zip
+}
+
+if ( $toolchain -eq "vs2019" ) {
+ if ( $archVer -eq 64 ) {
+ $sha1 = "B2C4F24B2388AEBAA6B8FCE3AE4E63D34D1517FE"
+ }
+ else {
+ $sha1 = "b970f51df255a27e0fdb7b665e70ed5281257f40"
+ }
+}
+
+install $sha1 $baseDestination-$archVer
+
+Set-EnvironmentVariable "LLVM_DYNAMIC_LIBS_100" ($baseDestination + "-_ARCH_")
+