summaryrefslogtreecommitdiff
path: root/coin/provisioning/common/windows/libclang.ps1
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 /coin/provisioning/common/windows/libclang.ps1
parentd14d8f0cac68018a17ec4177d31dbc4dd0ea55a9 (diff)
downloadqt5-41369b628203a0400a5e81184b2aa38e44ab5350.tar.gz
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>
Diffstat (limited to 'coin/provisioning/common/windows/libclang.ps1')
-rw-r--r--coin/provisioning/common/windows/libclang.ps116
1 files changed, 12 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