mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 05:18:08 +02:00
meson: Fix -latomic check
Commit54ba73ef10(configure.ac/meson.build: Fix -latomic test) fixed some checks for -latomic, and then commit54bbe600ec(configure.ac: rework -latomic check) further extended the fixes in configure.ac but not in Meson. This commit extends those fixes to the Meson tests. Fixes:54bbe600ec(configure.ac: rework -latomic check) Reviewed-by: Eric Engestrom <eric.engestrom@intel.com> Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
This commit is contained in:
parent
9cc577761f
commit
b29b5a82a1
1 changed files with 7 additions and 1 deletions
|
|
@ -830,7 +830,13 @@ endif
|
|||
# Check for GCC style atomics
|
||||
dep_atomic = null_dep
|
||||
|
||||
if cc.compiles('int main() { int n; return __atomic_load_n(&n, __ATOMIC_ACQUIRE); }',
|
||||
if cc.compiles('''#include <stdint.h>
|
||||
int main() {
|
||||
struct {
|
||||
uint64_t *v;
|
||||
} x;
|
||||
return (int)__atomic_load_n(x.v, __ATOMIC_ACQUIRE);
|
||||
}''',
|
||||
name : 'GCC atomic builtins')
|
||||
pre_args += '-DUSE_GCC_ATOMIC_BUILTINS'
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue