diff options
Diffstat (limited to 'meson.build')
-rw-r--r-- | meson.build | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/meson.build b/meson.build index b1028ee6..f0cb2543 100644 --- a/meson.build +++ b/meson.build @@ -180,6 +180,20 @@ realtime = cc.find_library('rt') dlsym = cc.find_library('dl') zlib = cc.find_library('z') +if cc.links(''' +#include <stdint.h> +int main(void) { + uint32_t x32 = 0; + uint64_t x64 = 0; + __atomic_load_n(&x32, __ATOMIC_SEQ_CST); + __atomic_load_n(&x64, __ATOMIC_SEQ_CST); + return 0; +}''', name : 'built-in atomics') + libatomic = null_dep +else + libatomic = cc.find_library('atomic') +endif + if cc.has_header('linux/kd.h') config.set('HAVE_LINUX_KD_H', 1) endif |