Skip to content

Commit dea1192

Browse files
committed
Use clang GNU frontend for Windows SYCL CI
1 parent 6a5a4b9 commit dea1192

1 file changed

Lines changed: 13 additions & 4 deletions

File tree

.github/actions/setup-sycl-toolchain/action.yml

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -130,12 +130,21 @@ runs:
130130
if (-not $clangClPath) {
131131
$clangClPath = $clangCl.FullName
132132
}
133-
$clangClShortPath = Get-ShortPath $clangClPath
134133
$clangBin = Split-Path $clangClPath -Parent
134+
$clangPath = Join-Path $clangBin 'clang.exe'
135+
$clangCxxPath = Join-Path $clangBin 'clang++.exe'
136+
if (-not (Test-Path $clangPath)) {
137+
throw "clang.exe was not found next to $clangClPath. Install the Visual Studio LLVM/Clang toolset on the Windows runner."
138+
}
139+
if (-not (Test-Path $clangCxxPath)) {
140+
throw "clang++.exe was not found next to $clangClPath. Install the Visual Studio LLVM/Clang toolset on the Windows runner."
141+
}
142+
$clangShortPath = Get-ShortPath $clangPath
143+
$clangCxxShortPath = Get-ShortPath $clangCxxPath
135144
136-
"ITLABAI_CC=$clangClShortPath" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
137-
"ITLABAI_CXX=$clangClShortPath" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
138-
"ITLABAI_ACPP_CPU_CXX=$clangClShortPath" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
145+
"ITLABAI_CC=$clangShortPath" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
146+
"ITLABAI_CXX=$clangCxxShortPath" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
147+
"ITLABAI_ACPP_CPU_CXX=$clangCxxShortPath" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
139148
"$clangBin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
140149
141150
- name: Configure Windows toolchain environment

0 commit comments

Comments
 (0)