Skip to content

Commit 99d68f9

Browse files
committed
[libcxx] [ci] Make the CI find the right version of Clang-cl
We install a (or in practice, update a preexisting) copy of Clang, in order to get a specific version that we want. At that point in the procedure, this is the only version of Clang in the PATH. However, the step of adding the MSVC build tools to the environment also ends up adding another copy of Clang, bundled with MSVC, into the PATH. Due to this, CMake ends up finding and preferring the older version of Clang bundled with MSVC, rather than the one we intend to be used. Manually add the directory of the version of Clang we want to use at the head of the search path, after initializing the MSVC build tool environment. The directory name we add is a hardcoded guess of where it is installed - this is not ideal, but seems like the most straightforward solution for now.
1 parent f4370fb commit 99d68f9

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

.github/workflows/libcxx-build-and-test.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -281,6 +281,10 @@ jobs:
281281
- name: Set up the MSVC dev environment
282282
if: ${{ matrix.mingw != true }}
283283
uses: ilammy/msvc-dev-cmd@0b201ec74fa43914dc39ae48a89fd1d8cb592756 # v1.13.0
284+
- name: Add the installed Clang at the start of the path
285+
if: ${{ matrix.mingw != true }}
286+
run: |
287+
echo "c:\Program Files\LLVM\bin" | Out-File -FilePath $Env:GITHUB_PATH -Encoding utf8 -Append
284288
- name: Build and test
285289
run: |
286290
bash libcxx/utils/ci/run-buildbot ${{ matrix.config }}

0 commit comments

Comments
 (0)