This repository was archived by the owner on Jan 12, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +7
-5
lines changed Expand file tree Collapse file tree 2 files changed +7
-5
lines changed Original file line number Diff line number Diff line change 66if ($Env: ENABLE_QIRRUNTIME -ne " false" ) {
77 if (($IsWindows ) -or ((Test-Path Env:/ AGENT_OS) -and ($Env: AGENT_OS.StartsWith (" Win" )))) {
88 if (! (Get-Command clang - ErrorAction SilentlyContinue) -or `
9- ! (Get-Command clang- format - ErrorAction SilentlyContinue)) {
10- choco install llvm -- version= 11.1 .0
11- Write-Host " ##vso[task.setvariable variable=PATH;]$Env: Path ;C:\Program Files\LLVM\bin"
9+ ! (Get-Command clang- format - ErrorAction SilentlyContinue) -or `
10+ (Test-Path Env:/ AGENT_OS)) {
11+ choco install llvm -- version= 11.1 .0 -- allow- downgrade
12+ Write-Host " ##vso[task.setvariable variable=PATH;]$ ( $env: SystemDrive ) \Program Files\LLVM\bin;$Env: PATH "
1213 }
1314 if (! (Get-Command ninja - ErrorAction SilentlyContinue)) {
1415 choco install ninja
Original file line number Diff line number Diff line change @@ -192,9 +192,10 @@ function Build-CMakeProject {
192192 $env: CXX = " clang++.exe"
193193 $env: RC = " clang++.exe"
194194
195- if (! (Get-Command clang - ErrorAction SilentlyContinue) -and (choco find -- idonly - l llvm) -contains " llvm" ) {
195+ if ((! (Get-Command clang - ErrorAction SilentlyContinue) -and (choco find -- idonly - l llvm) -contains " llvm" ) -or `
196+ (Test-Path Env:/ AGENT_OS)) {
196197 # LLVM was installed by Chocolatey, so add the install location to the path.
197- $env: PATH + = " ; $ ( $env: SystemDrive ) \Program Files\LLVM\bin"
198+ $env: PATH = " $ ( $env: SystemDrive ) \Program Files\LLVM\bin; $ env: Path "
198199 }
199200
200201 if (Get-Command clang- tidy - ErrorAction SilentlyContinue) {
You can’t perform that action at this time.
0 commit comments