[llvm] [libcxx] [ci] Make the CI find the right version of Clang-cl (PR #161736)

Martin Storsjö via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 3 01:05:34 PDT 2025


mstorsjo wrote:

Unfortunately, this change can't be landed as is; this breaks the `libcxx/system_reserved_names.gen.py` test in all the clang-cl configurations:

```
2025-10-02T22:06:18.5198506Z # | In file included from D:\a\llvm-project\llvm-project\build\clang-cl-dll\libcxx\test\libcxx\system_reserved_names.gen.py\vector.compile.pass.cpp:166:
2025-10-02T22:06:18.5203380Z # | In file included from D:/a/llvm-project/llvm-project/build/clang-cl-dll/libcxx/test-suite-install/include/c++/v1\vector:312:
2025-10-02T22:06:18.6188414Z # | In file included from D:/a/llvm-project/llvm-project/build/clang-cl-dll/libcxx/test-suite-install/include/c++/v1\__vector/comparison.h:13:
2025-10-02T22:06:18.6195056Z # | In file included from D:/a/llvm-project/llvm-project/build/clang-cl-dll/libcxx/test-suite-install/include/c++/v1\__algorithm/lexicographical_compare.h:30:
2025-10-02T22:06:18.6201844Z # | In file included from D:/a/llvm-project/llvm-project/build/clang-cl-dll/libcxx/test-suite-install/include/c++/v1\cwchar:118:
2025-10-02T22:06:18.6242316Z # | In file included from D:/a/llvm-project/llvm-project/build/clang-cl-dll/libcxx/test-suite-install/include/c++/v1\wchar.h:116:
2025-10-02T22:06:18.6248276Z # | In file included from C:\Program Files (x86)\Windows Kits\10\include\10.0.26100.0\ucrt\wchar.h:29:
2025-10-02T22:06:18.6340279Z # | In file included from C:\Program Files\LLVM\lib\clang\20\include\intrin.h:22:
2025-10-02T22:06:18.6357937Z # | In file included from C:\Program Files\LLVM\lib\clang\20\include\x86intrin.h:15:
2025-10-02T22:06:18.6363418Z # | In file included from C:\Program Files\LLVM\lib\clang\20\include\immintrin.h:712:
2025-10-02T22:06:18.6405287Z # | C:\Program Files\LLVM\lib\clang\20\include\avx10_2bf16intrin.h:522:69: error: expected ')'
2025-10-02T22:06:18.6425064Z # |   522 | static __inline__ int __DEFAULT_FN_ATTRS128 _mm_comieq_sbh(__m128bh A,
2025-10-02T22:06:18.6452224Z # |       |                                                                     ^
2025-10-02T22:06:18.6469942Z # | D:\a\llvm-project\llvm-project\build\clang-cl-dll\libcxx\test\libcxx\system_reserved_names.gen.py\vector.compile.pass.cpp:106:11: note: expanded from macro 'A'
2025-10-02T22:06:18.6497033Z # |   106 | #define A SYSTEM_RESERVED_NAME
2025-10-02T22:06:18.6516120Z # |       |           ^
```

The issue seems to be that Clang in 20.x has added more AVX10 intrinsics headers, and these use unreserved parameter names such as `A` directly in the intrinsics headers; this is prone to break user code, exactly which the libcxx test here tries to check for. CC @FreddyLeaf @phoebewang. This issue is already existent in all Clang 20.x releases, and all 21.x releases so far (but we have a chance to have it fixed there at least). See 6f04f46927cf54d19cc2a1470f47d5db4b3b96bb for a similar earlier issue fix.

Action point to Clang: CC @erichkeane (feel free to delegate) and @phoebewang  - This is at least the second case when the Intel intrinsics headers expose this kind of issue. Can Clang set up some kind of similar test as libcxx has, to make sure we don't add more similar issues in the Clang bundled resource headers (in particular, the intrinsics headers which are a pain to wade through).


The libcxx CI is already on Clang 20.x for the mingw build configurations (and likewise for the Linux test configurations, I would presume), but those don't seem to pull in the Clang intrinsics headers. The fact that intrinsics headers are included here seems to be a specific quirk in the MS UCRT headers; since version 10.0.26100.0 of those headers, `wchar.h` seems to pull in `intrin.h` - otherwise this would have been found much sooner.

Aside from this, it seems like at least the `clang-cl-dll` test config also fails `std/input.output/filesystems/fs.op.funcs/fs.op.proximate/proximate.pass.cpp`. No idea why that happens; we'll see if that's a fluke if we get the other issues sorted out.

@philnik777 As Clang 20.x (and early 21.x) intrinsics headers seem to be broken wrt this, what's the best way forward here do you think? Explicitly skip this test for e.g. `clang-20 && msvc` or something like that, and make sure it's fixed in 21.x before we'd try to upgrade to that in CI?

https://github.com/llvm/llvm-project/pull/161736


More information about the llvm-commits mailing list