diff mbox

[libdrm,v2,02/23] meson: don't enable libdrm_radeon without atomic support

Message ID 20180404153818.26179-2-eric.engestrom@imgtec.com (mailing list archive)
State New, archived
Headers show

Commit Message

Eric Engestrom April 4, 2018, 3:37 p.m. UTC
In the 'auto' case, the `with_atomic` check was bypassed.

Signed-off-by: Eric Engestrom <eric.engestrom@imgtec.com>
---
 meson.build | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

Comments

Dylan Baker April 4, 2018, 9 p.m. UTC | #1
Quoting Eric Engestrom (2018-04-04 08:37:57)
> In the 'auto' case, the `with_atomic` check was bypassed.
> 
> Signed-off-by: Eric Engestrom <eric.engestrom@imgtec.com>
> ---
>  meson.build | 12 +++++++-----
>  1 file changed, 7 insertions(+), 5 deletions(-)
> 
> diff --git a/meson.build b/meson.build
> index e762dcc44bff5deac4d1..72cdd14a3ba834abde4d 100644
> --- a/meson.build
> +++ b/meson.build
> @@ -82,11 +82,13 @@ endif
>  
>  with_radeon = false
>  _radeon = get_option('radeon')
> -if _radeon != 'false'
> -  if _radeon == 'true' and not with_atomics
> -    error('libdrm_radeon requires atomics.')
> -  endif
> -  with_radeon = true

What about just change this to `with_radeon = with_atomics`? We've already
verified that if radeon == true that atomics are present.

> +if _radeon == 'auto'
> +  with_radeon = with_atomics
> +else
> +  with_radeon = _radeon == 'true'
> +endif
> +if with_radeon and not with_atomics
> +  error('libdrm_radeon requires atomics.')
>  endif
>  
>  with_amdgpu = false
> -- 
> Cheers,
>   Eric
>
diff mbox

Patch

diff --git a/meson.build b/meson.build
index e762dcc44bff5deac4d1..72cdd14a3ba834abde4d 100644
--- a/meson.build
+++ b/meson.build
@@ -82,11 +82,13 @@  endif
 
 with_radeon = false
 _radeon = get_option('radeon')
-if _radeon != 'false'
-  if _radeon == 'true' and not with_atomics
-    error('libdrm_radeon requires atomics.')
-  endif
-  with_radeon = true
+if _radeon == 'auto'
+  with_radeon = with_atomics
+else
+  with_radeon = _radeon == 'true'
+endif
+if with_radeon and not with_atomics
+  error('libdrm_radeon requires atomics.')
 endif
 
 with_amdgpu = false