From: Eric Engestrom Date: Tue, 29 Oct 2019 14:21:08 +0000 (+0000) Subject: meson: add variable to control the symbols checks X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=2c4395e61c4c090a85f21d57f2d670b5cd59795a;p=mesa.git meson: add variable to control the symbols checks Signed-off-by: Eric Engestrom Reviwed-by: Dylan Baker --- diff --git a/meson.build b/meson.build index b2d160ccedf..dcc4827fed7 100644 --- a/meson.build +++ b/meson.build @@ -1681,6 +1681,7 @@ endif pkg = import('pkgconfig') prog_nm = find_program('nm', required : false) +with_symbols_check = prog_nm.found() and with_tests # This quirk needs to be applied to sources with functions defined in assembly # as GCC LTO drops them. See: https://bugs.freedesktop.org/show_bug.cgi?id=109391 diff --git a/src/amd/vulkan/meson.build b/src/amd/vulkan/meson.build index ddb2249b86f..732659fb644 100644 --- a/src/amd/vulkan/meson.build +++ b/src/amd/vulkan/meson.build @@ -166,7 +166,7 @@ libvulkan_radeon = shared_library( install : true, ) -if with_tests and prog_nm.found() +if with_symbols_check test( 'radv symbols check', symbols_check, diff --git a/src/egl/meson.build b/src/egl/meson.build index 1c1143f3418..e691f509067 100644 --- a/src/egl/meson.build +++ b/src/egl/meson.build @@ -186,7 +186,7 @@ if not with_glvnd ) endif -if with_tests and prog_nm.found() +if with_symbols_check if with_glvnd egl_symbols = files('egl-glvnd-symbols.txt') else diff --git a/src/freedreno/vulkan/meson.build b/src/freedreno/vulkan/meson.build index b5299232518..d7f91d24358 100644 --- a/src/freedreno/vulkan/meson.build +++ b/src/freedreno/vulkan/meson.build @@ -119,7 +119,7 @@ libvulkan_freedreno = shared_library( install : true, ) -if with_tests and prog_nm.found() +if with_symbols_check test( 'tu symbols check', symbols_check, diff --git a/src/gbm/meson.build b/src/gbm/meson.build index 311bcc74efc..c4b1c25f9d1 100644 --- a/src/gbm/meson.build +++ b/src/gbm/meson.build @@ -66,7 +66,7 @@ pkg.generate( libraries_private : '-ldl', # FIXME: autotools lists this a incomplete ) -if with_tests and prog_nm.found() +if with_symbols_check test( 'gbm-symbols-check', symbols_check, diff --git a/src/intel/vulkan/meson.build b/src/intel/vulkan/meson.build index 10fc4c4e611..a829361e926 100644 --- a/src/intel/vulkan/meson.build +++ b/src/intel/vulkan/meson.build @@ -207,7 +207,7 @@ libvulkan_intel = shared_library( install : true, ) -if with_tests and prog_nm.found() +if with_symbols_check test( 'anv symbols check', symbols_check, diff --git a/src/mapi/es1api/meson.build b/src/mapi/es1api/meson.build index 9d97dd67c40..b2dcd5413ad 100644 --- a/src/mapi/es1api/meson.build +++ b/src/mapi/es1api/meson.build @@ -62,7 +62,7 @@ pkg.generate( libraries_private : gl_priv_libs, ) -if with_tests and prog_nm.found() +if with_symbols_check test( 'es1-ABI-check', symbols_check, diff --git a/src/mapi/es2api/meson.build b/src/mapi/es2api/meson.build index cb7bd41ad42..119e8d36a75 100644 --- a/src/mapi/es2api/meson.build +++ b/src/mapi/es2api/meson.build @@ -62,7 +62,7 @@ pkg.generate( libraries_private : gl_priv_libs, ) -if with_tests and prog_nm.found() +if with_symbols_check test( 'es2-ABI-check', symbols_check, diff --git a/src/mapi/shared-glapi/meson.build b/src/mapi/shared-glapi/meson.build index 7d0fe115d63..27ae6bcc158 100644 --- a/src/mapi/shared-glapi/meson.build +++ b/src/mapi/shared-glapi/meson.build @@ -74,7 +74,7 @@ if with_any_opengl and with_tests ), suite : ['mapi'], ) - if prog_nm.found() + if with_symbols_check test( 'shared-glapi symbols check', symbols_check,