clang does not automatically link atomic
builtins
#73361
Labels
clang:driver
'clang' and 'clang++' user-facing binaries. Not 'clang-cl'
atomic
builtins
#73361
On Linux (and others?), the
__atomic_store
(and other atomic) builtin doesn't work out of the box.User will see a linker error
If the system has gcc installed, the user could add
-latomic
. However, on systems without gcc installed, the user would have to find the correct compiler-rt library that needs to be linked, which is not user friendly. clang should just atomically link to the compiler-rt when the builtin needs to be linkedReproducer:
Godbolt: https://godbolt.org/z/f4jchEvxv
The text was updated successfully, but these errors were encountered: