summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@qt.io>2018-04-30 09:36:26 +0200
committerJani Heikkinen <jani.heikkinen@qt.io>2018-05-01 06:34:05 +0000
commit41369b628203a0400a5e81184b2aa38e44ab5350 (patch)
tree7e9e1cd3c2c08ef4714c50b3ae0f0fb8d4f10294
parentd14d8f0cac68018a17ec4177d31dbc4dd0ea55a9 (diff)
Install the MinGW build of libclang
This restores the MinGW installation of libclang on Windows 7 and installs the MSVC and MinGW builds in parallel on Windows 10. For compatibility reasons the MSVC installation is done last, to ensure that the older LLVM_INSTALL_DIR variable points to the MSVC installation. In addition though we now get LLVM_INSTALL_DIR_MINGW and LLVM_INSTALL_DIR_MSVC, which qt_find_clang.prf in qttools can use in the future. Task-number: QTBUG-66015 Change-Id: I8b53b85d0cde597c88a089f2a05f03947828d9bd Reviewed-by: Simo Fält <simo.falt@qt.io>
-rw-r--r--coin/provisioning/common/windows/libclang.ps116
-rw-r--r--coin/provisioning/qtci-windows-10-x86/08-libclang.ps12
-rw-r--r--coin/provisioning/qtci-windows-10-x86_64/08-libclang.ps12
-rw-r--r--coin/provisioning/qtci-windows-7-x86/08-libclang.ps11
4 files changed, 17 insertions, 4 deletions
diff --git a/coin/provisioning/common/windows/libclang.ps1 b/coin/provisioning/common/windows/libclang.ps1
index 745b61ed..5ba0a0aa 100644
--- a/coin/provisioning/common/windows/libclang.ps1
+++ b/coin/provisioning/common/windows/libclang.ps1
@@ -1,6 +1,7 @@
param(
[Int32]$archVer=32,
- [string]$toolchain="vs2015"
+ [string]$toolchain="vs2015",
+ [bool]$setDefault=$true
)
. "$PSScriptRoot\helpers.ps1"
@@ -11,17 +12,19 @@ param(
Get-Content "$PSScriptRoot\..\shared\sw_versions.txt" | Foreach-Object {
$var = $_.Split('=')
- New-Variable -Name $var[0] -Value $var[1]
+ New-Variable -Name $var[0] -Value $var[1] -Force
$libclang_version = $libclang_version -replace '["."]'
}
$zip = "c:\users\qt\downloads\libclang.7z"
-$baseDestination = "C:\Utils\libclang-" + $libclang_version
+$baseDestination = "C:\Utils\libclang-" + $libclang_version + "-" + $toolchain
function setURL() {
$script:url = "https://download.qt.io/development_releases/prebuilt/libclang/libclang-release_$libclang_version-windows-$toolchain`_$archVer.7z"
}
+$toolchainSuffix = ""
+
if ( $toolchain -eq "vs2015" ) {
if ( $archVer -eq 64 ) {
$sha1 = "37afa18d243a50c05bee5c6e16b409ed526ec17a"
@@ -47,6 +50,7 @@ if ( $toolchain -eq "vs2015" ) {
Extract-7Zip $zip C:\Utils\
Rename-Item C:\Utils\libclang $destination
Remove-Item -Force -Path $zip
+ $toolchainSuffix = "msvc"
}
if ( $toolchain -eq "mingw" ) {
@@ -74,7 +78,11 @@ if ( $toolchain -eq "mingw" ) {
Extract-7Zip $zip C:\Utils\
Rename-Item C:\Utils\libclang $destination
Remove-Item -Force -Path $zip
+ $toolchainSuffix = "mingw"
}
-Set-EnvironmentVariable "LLVM_INSTALL_DIR" ($baseDestination + "-_ARCH_")
+if ( $setDefault ) {
+ Set-EnvironmentVariable "LLVM_INSTALL_DIR" ($baseDestination + "-_ARCH_")
+}
+Set-EnvironmentVariable ("LLVM_INSTALL_DIR_" + $toolchainSuffix) ($baseDestination + "-_ARCH_")
Write-Output "libClang = $libclang_version" >> ~/versions.txt
diff --git a/coin/provisioning/qtci-windows-10-x86/08-libclang.ps1 b/coin/provisioning/qtci-windows-10-x86/08-libclang.ps1
index 8da8cc5a..4d56d612 100644
--- a/coin/provisioning/qtci-windows-10-x86/08-libclang.ps1
+++ b/coin/provisioning/qtci-windows-10-x86/08-libclang.ps1
@@ -1 +1,3 @@
+# Do not set the default LLVM_INSTALL_DIR for mingw, leave it with msvc for compat
+. "$PSScriptRoot\..\common\windows\libclang.ps1" 32 mingw $False
. "$PSScriptRoot\..\common\windows\libclang.ps1" 32 vs2015
diff --git a/coin/provisioning/qtci-windows-10-x86_64/08-libclang.ps1 b/coin/provisioning/qtci-windows-10-x86_64/08-libclang.ps1
index f7a722d7..62f11292 100644
--- a/coin/provisioning/qtci-windows-10-x86_64/08-libclang.ps1
+++ b/coin/provisioning/qtci-windows-10-x86_64/08-libclang.ps1
@@ -1 +1,3 @@
+# Do not set the default LLVM_INSTALL_DIR for mingw, leave it with msvc for compat
+. "$PSScriptRoot\..\common\windows\libclang.ps1" 64 mingw $False
. "$PSScriptRoot\..\common\windows\libclang.ps1" 64 vs2015
diff --git a/coin/provisioning/qtci-windows-7-x86/08-libclang.ps1 b/coin/provisioning/qtci-windows-7-x86/08-libclang.ps1
new file mode 100644
index 00000000..375deed3
--- /dev/null
+++ b/coin/provisioning/qtci-windows-7-x86/08-libclang.ps1
@@ -0,0 +1 @@
+. "$PSScriptRoot\..\common\windows\libclang.ps1" 32 mingw