1From 8b8953adcd0071c39a78e6d2fd437ad0e149591d Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Sat, 12 Oct 2019 17:46:26 -0700
4Subject: [PATCH] meson: Run atomics test on clang as well
5
6Fixes
7./glib-2.62.1/glib/gatomic.c:675:2: error: G_ATOMIC_LOCK_FREE defined, but incapable of lock-free atomics.
8^
9
10Upstream-Status: Pending
11Signed-off-by: Khem Raj <raj.khem@gmail.com>
12---
13 meson.build | 2 +-
14 1 file changed, 1 insertion(+), 1 deletion(-)
15
16diff --git a/meson.build b/meson.build
17index 5beb14d..963815f 100644
18--- a/meson.build
19+++ b/meson.build
20@@ -2050,7 +2050,7 @@ atomicdefine = '''
21 # We know that we can always use real ("lock free") atomic operations with MSVC
22 if cc.get_id() == 'msvc' or cc.get_id() == 'clang-cl' or cc.links(atomictest, name : 'atomic ops')
23   have_atomic_lock_free = true
24-  if cc.get_id() == 'gcc' and not cc.compiles(atomicdefine, name : 'atomic ops define')
25+  if (cc.get_id() == 'gcc' or cc.get_id() == 'clang') and not cc.compiles(atomicdefine, name : 'atomic ops define')
26     # Old gcc release may provide
27     # __sync_bool_compare_and_swap but doesn't define
28     # __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4
29