mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-11-10 03:16:17 +01:00
meson: do not run atomic test with msvc
The latest patches have fixed the atomic check, which uses __sync_bool_compare_and_swap , and thus fails on MSVC. As a result, in gatomic.c, we ended up trying to include pthread.h, which failed. This mimics the old behaviour a bit more closely, where G_ATOMIC_LOCK_FREE was always defined in the win32 glibconfig.h https://bugzilla.gnome.org/show_bug.cgi?id=796220
This commit is contained in:
parent
7551267f19
commit
3c9a7ec270
@ -1446,7 +1446,9 @@ atomictest = '''int main() {
|
||||
return 0;
|
||||
}
|
||||
'''
|
||||
if cc.links(atomictest, name : 'atomic ops')
|
||||
|
||||
# We know that we can always use real ("lock free") atomic operations with MSVC
|
||||
if cc.get_id() == 'msvc' or cc.links(atomictest, name : 'atomic ops')
|
||||
glibconfig_conf.set('G_ATOMIC_LOCK_FREE', true)
|
||||
else
|
||||
if host_machine.cpu_family() == 'x86' and cc.links(atomictest, args : '-march=i486')
|
||||
|
Loading…
Reference in New Issue
Block a user