mirror of
https://gitlab.freedesktop.org/mesa/drm.git
synced 2026-05-09 03:58:05 +02:00
meson.build: fix intel atomics detection
Use the stronger compiler.link() test (instead of the weaker compiler.compile()) to fix the intel atomics detection. Fixes false positive in case of sparc compile (buildroot toolchain). Signed-off-by: Peter Seiderer <ps.report@gmx.net> Reviewed-by: Eric Engestrom <eric.engestrom@intel.com>
This commit is contained in:
parent
02e1d0ff8b
commit
8de2696213
1 changed files with 2 additions and 1 deletions
|
|
@ -52,9 +52,10 @@ intel_atomics = false
|
|||
lib_atomics = false
|
||||
|
||||
dep_atomic_ops = dependency('atomic_ops', required : false)
|
||||
if cc.compiles('''
|
||||
if cc.links('''
|
||||
int atomic_add(int *i) { return __sync_add_and_fetch (i, 1); }
|
||||
int atomic_cmpxchg(int *i, int j, int k) { return __sync_val_compare_and_swap (i, j, k); }
|
||||
int main() { }
|
||||
''',
|
||||
name : 'Intel Atomics')
|
||||
intel_atomics = true
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue