[libcxx-commits] [libcxx] [libc++][test] Workaround for atomic tests linker errors on Linux systems without libatomic.so (PR #73398)
Martin Storsjö via libcxx-commits
libcxx-commits at lists.llvm.org
Thu Nov 30 05:47:34 PST 2023
mstorsjo wrote:
> I think it means that we're failing to detect `non-lockfree-atomics` on Windows, yet the code apparently seems to work. To unblock this patch and restore some CI stability, we could mark these tests as `UNSUPPORTED: !non-lockfree-atomics` and investigate the Windows problems separately. I suspect it would be really easy for @mstorsjo to help us out here.
I think the reason for these cases is pretty simple; when compiling a piece of code that uses atomics, there's nothing that says that the compiler _MUST_ generate a call to `__atomic_load` or similar. The compiler is free to decide whether it is better to generate such code inline or generate a function call to a helper function.
So for such environments where the atomics helper functions are unavailable, some tests may succeed and some may fail, depending on what code generation decisions the compiler makes - thus, one can't really mark them `XFAIL`.
https://github.com/llvm/llvm-project/pull/73398
More information about the libcxx-commits
mailing list