Skip to content

Commit 25eab2b

Browse files
author
Steve Lee (POWERSHELL HE/HIM) (from Dev Box)
committed
add llvm path
1 parent 2e105cc commit 25eab2b

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

.pipelines/DSC-Official.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -124,11 +124,11 @@ extends:
124124
ob_restore_phase: true
125125
- pwsh: |
126126
Set-Location "$(Build.SourcesDirectory)/DSC"
127-
write-verbose -verbose (dir "$($env:PROGRAMFILES)\Microsoft Visual Studio\2022\Enterprise" -r clang.exe | out-string)
128-
$VSINSTALLDIR = $(vswhere.exe -latest -requires Microsoft.VisualStudio.Component.VC.Llvm.Clang -property installationPath)
129-
$VCINSTALLDIR = Join-Path $VSINSTALLDIR "VC"
130-
$LLVM_ROOT = Join-Path $VCINSTALLDIR "Tools\Llvm\x64"
131-
$Env:PATH += ";$LLVM_ROOT\bin"
127+
$LLVMBIN = "$($env:PROGRAMFILES)\Microsoft Visual Studio\2022\Enterprise\VC\Tools\Llvm\bin"
128+
if (!Test-Path $LLVMBIN) {
129+
throw "LLVM path '$LLVMBIN' does not exist"
130+
}
131+
$env:PATH += ";$LLVMBIN"
132132
write-verbose -verbose (gcm clang.exe | out-string)
133133
./build.ps1 -Release -Architecture $(buildName) -SkipLinkCheck
134134
displayName: 'Build $(buildName)'

0 commit comments

Comments
 (0)