pixman: Branch 'master'
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Mon Jun 10 16:45:21 UTC 2019
meson.build | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
New commits:
commit fd5c0da57985a430912907d4a898ed1ddb854ead
Author: Christoph Reiter <reiter.christoph at gmail.com>
Date: Sat May 11 10:23:08 2019 +0200
meson: fix TLS support under mingw
GCC on Windows complains that "__declspec(thread)" doesn't work, but still
compiles it, so the meson check doesn't work. The warning printed by gcc:
"warning: 'thread' attribute directive ignored [-Wattributes]"
Pass -Werror=attributes to make the check fail instead.
This fixes the test suite (minus gtk tests) on Windows with mingw.
diff --git a/meson.build b/meson.build
index 3a1a4c2..2118abf 100644
--- a/meson.build
+++ b/meson.build
@@ -408,8 +408,12 @@ foreach h : ['sys/mman.h', 'fenv.h', 'unistd.h']
endif
endforeach
+# gcc on Windows only warns that __declspec(thread) isn't supported,
+# passing -Werror=attributes makes it fail.
if (host_machine.system() == 'windows' and
- cc.compiles('int __declspec(thread) foo;', name : 'TLS via __declspec(thread)'))
+ cc.compiles('int __declspec(thread) foo;',
+ args : cc.get_supported_arguments(['-Werror=attributes']),
+ name : 'TLS via __declspec(thread)'))
config.set('TLS', '__declspec(thread)')
elif cc.compiles('int __thread foo;', name : 'TLS via __thread')
config.set('TLS', '__thread')
More information about the xorg-commit
mailing list