<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/55880>55880</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
mlir: async runtime uses atomics but does not link with libatomic
</td>
</tr>
<tr>
<th>Labels</th>
<td>
new issue
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
jpalus
</td>
</tr>
</table>
<pre>
MLIR's async runtime uses atomics:
https://github.com/llvm/llvm-project/blob/d86a206f06a51c12a9fcf2c20199f4e819751c0c/mlir/lib/ExecutionEngine/AsyncRuntime.cpp#L76
but appears not to link against `libatomic` on arch that require it:
https://github.com/llvm/llvm-project/blob/d86a206f06a51c12a9fcf2c20199f4e819751c0c/mlir/lib/ExecutionEngine/CMakeLists.txt#L139-L147
Resulting in unresolved symbols when building ie for armv6:
```
undefined reference to `__atomic_fetch_add_8'
```
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJzNUslunDAYfhq4WEHG7AcO0yaVKk0u8wLIyw84MTb1MpN5-xpoR1UPlXKrZOF_Mb-_xcyIe_96_n5JSOMQdXfNkQ3aywVQcBBL3iySu6Q4Jfg5wafZ-3XPyLe4JunnwDJulpgodf29Pa3WvAH3MWXKsLiJtqYE1yOuaZXznNBu5CPhBOddN5bQ5l0T65jHo4uSdpsjt_9ePoAHL41-0ZPUECunDeTlwJjxdU1IcW7qA93xZcEjuq5ArUPaeOQNUlK_IzpRqZ1HSY3j8INZjJHRiFo-Iz9Tjyz8CNICkv4_4vz1lb7DWTrvMv_hN8Z50T2d87L5k_cFXFBe6glJjYK24Iy6gkDuvjCjHLrNoBELUon9DKDR2Mh8udYPqlGOX2tPgxYwRggiyjKCBc1hUzP2h-HQbxjB83mgQgxtfEN_TUlFX4iu6GjqpVfQ7zSL0z8eGtrMEwYO53bbblFw9DAsDVb1n3ZEOhfAxaCq2hanc18SBhQ62jY1xmXRNpjgihSUNdVYs7JJFWWgXJ9UXxJCNNzQPiLGSfWcyp5gEq3FFY4WVk1GCFQ1r4quGHMBOE9KDAuVKttwZMZOqe13SCxMLjbV7uWjSZ2TkwbYr4vzafCzsf3bSlVw6X5zvyP_CbiFLZE">