<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=http://email.email.llvm.org/c/eJylVMuO6zYM_RpnQ8jwK6-FF2lmggbtvV3MFLc7Q5aZWBNZcvVIJn9fyk5TDNBFgQKJZJMUdXh46NZ09zpZZUm5g6RY0Y-2gxk9rTfuJHPdhR5bqWkViuszMOa5PaNPyheKGMqCxUAyu7uzxkT7v6VwPbf4NM2hwAZtGPdmkMIBe9n__Lr_pTn8_n3_fvzte_P6x_Ht_Y3yNc0c05zQi77hXddUwH6gtcaSO-hz4LbDjvErl4q3Ukl_ZxpvsP_GL3iQCl3EP7zvm6rCapV20pJh36O4HIIWXhr9-imdd6lITfsBzMA_0cDUfP-TonIXOctekmwXOWCqiwQ-8OwgaN4qBG_gJHUHSraW2_szzXxwYpPl5ZeTSuoLWhBmGDidPFE52MFN-h7wU3pydAg54dgEh8Cu8Q6HCFJfjeCxjKTYzvm11B885myDVB04b8YRJ5wutF8vSOcT87obR-qU9ur-3yg2NiIYXISiqac3Yy9g5bn3YDT4HuHH7u0Is2hSgGNSrK8IXDkD3koqL8aIYOOlYFEhp9IEoZMd9wjmBA-OIThJAiTqlQbmZntDdmplcLGhikhQT70qassqiyiGO3zjRIc18KvU4RNa8zmz-rlZNasqwiK9rh0gGakB-9icpNgD5YgVTjoCJyzeIoQwAkVREY4YtHE7RsTgUakvZL7PYfQfDC0demLPAfcRUrL86WRsGGA0zidLGptN7_3ooryKw1TAdSCpOmGCdZierQkjmafJ6lEzb--EhnnDKDEKz0hps8QY4WaxuS56LboxusVAVTh6_TOg89Ej4gQwjNJHLeJ8rvKo8e2iq8tuW275ggffG1u_8SFYLvfW3BbBqvor0jPRFtqUZPWA_djYaM0HXU2v0rkwjeGyrNabRV9vlu2mWJbbTGyrTdu2VV626xVv822ZrcvTZkEyQ-Vqoikpiii1KQU9E1eL_49A1kVWFFlebLOsWOebdJnTVq2rExdlW-RdUmU4EIfp1AdjzwtbTynbcHbkVNMH4-nkzsmzRpwAE0IvvcJ6_mjGWftbxXk5jd00MPR5kCKq_DHps87mbtIwR_FTT3dTT1O-mCqoJ_h_AScC5rI>53478</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
clang and wasm-ld 13 fails to indicate failed CMake detection of libAtomic.a
</td>
</tr>
<tr>
<th>Labels</th>
<td>
new issue
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
SamuraiCrow
</td>
</tr>
</table>
<pre>
`: && /opt/wasi-sdk/bin/clang --target=wasm32-wasi --sysroot=/opt/wasi-sdk/share/wasi-sysroot -mno-atomics -DCHECK_FUNCTION_EXISTS=__atomic_fetch_add_4 -Werror=unguarded-availability-new CMakeFiles/cmTC_44e46.dir/CheckFunctionExists.c.obj -o cmTC_44e46 -latomic && :`
wasm-ld: error: unable to find library -latomic
clang-13: error: linker command failed with exit code 1 (use -v to see invocation)
ninja: build stopped: subcommand failed.
Apparently -Werror=unguarded-availability-new or seems to not work right on the WASI target. I've also tried the current release candidate of wasm-ld using `ln -sf wasm_ld /usr/local/bin/lld` on my Manjaro Linux box with x86_64. It's either Clang, lld or CMake screwing up here as far as I can tell.
There are more details at my [forum post](https://llvm.discourse.group/t/when-trying-to-detect-libatomic-lld-fails-to-respect-cmakes-request-to-check-existence/6126)
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyNVMuO6zYM_RpnQ8jwIw9n4UWamaBBe28XMxe3O0OWmVgTWXL1SCZ_X8pOUwzQRYFEskmKOjw8dGu6e52ss6TcQVKs6UfbwYye1ht3krnuQo-t1LQKxfUZGPPcntEn5QtFDGXBYiCZ3d1ZY6L9v1K4nlt8muZQYIM2jHszSOGAvex_fd3_1hx-fN-_H__43rz-eXx7f6N8TTPHNCf0om941zVLYD_RWmPJHfQ5cNthx_iVS8VbqaS_M4032H_jFzxIhS7iH973zXKJy3XaSUuGfY_icghaeGn066d03qUiNe0HMAP_RgNT8_1Pispd5Cx7SbJd5IC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