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