LibAtomic fails to safely land after failing to detect

I get cmake/modules/CheckAtomic.cmake:59
Host compiler appears to require libatomic, but cannot find it.

I think this is either a bug in CMake or LLVM’s Linker. I’m using the WASI-SDK from here.

This is while trying to cross-compile LLVM 13 for WASI using the following command line:



Cross-posted to the LLVM Discourse.


CMake is testing for a working libAtomic.a on a single-threaded environment using Clang. Namely target wasm32-wasi. Can someone tell me how to update the detection script to report no functioning libAtomic.a if libAtomic.a is completely absent on the architecture in question? Currently trying to test using Clang isn’t working when it links against a non-existant file.


This is not a usage problem. I’ll make a new thread in the proper category.