meson: add variable to control the symbols checks
authorEric Engestrom <eric.engestrom@intel.com>
Tue, 29 Oct 2019 14:21:08 +0000 (14:21 +0000)
committerEric Engestrom <eric.engestrom@intel.com>
Tue, 5 Nov 2019 20:12:32 +0000 (20:12 +0000)
Signed-off-by: Eric Engestrom <eric.engestrom@intel.com>
Reviwed-by: Dylan Baker <dylan@pnwbakers>
meson.build
src/amd/vulkan/meson.build
src/egl/meson.build
src/freedreno/vulkan/meson.build
src/gbm/meson.build
src/intel/vulkan/meson.build
src/mapi/es1api/meson.build
src/mapi/es2api/meson.build
src/mapi/shared-glapi/meson.build

index b2d160ccedf1f0b304c3e152e14fcf41c7e254c8..dcc4827fed7e18d67a4d53a453f6d4cb71ce955e 100644 (file)
@@ -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
index ddb2249b86f8402d89940d06a59d303e2975670f..732659fb6446011e20fc76a6a80efad5ab79ed01 100644 (file)
@@ -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,
index 1c1143f34183da54f62f0e4d06231e1996781d6e..e691f509067239306b6b94c41a78ecc2215f5b91 100644 (file)
@@ -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
index b529923251895977c9e67c56074fd7c5af8e6f4f..d7f91d24358dc9c7693ca2ede12c80e98e6b1b4d 100644 (file)
@@ -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,
index 311bcc74efc2affcd11ed2e2d1703ff1343dc50f..c4b1c25f9d161aee3d24dfa1f88f75c2a65c3f61 100644 (file)
@@ -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,
index 10fc4c4e611df4c3c6beb8fd915b3ed4db664faa..a829361e926829e953103b3fdcaba7964c4f00ff 100644 (file)
@@ -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,
index 9d97dd67c40d95796b6b29e09b4974db8a983f3e..b2dcd5413ad69a6e82b75ee4156af4604cf8c0e6 100644 (file)
@@ -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,
index cb7bd41ad424af13e84fdfd6a514d47d88b5b19d..119e8d36a75e56eef908f9da6e510c257170133c 100644 (file)
@@ -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,
index 7d0fe115d63f92d6834830d07cf559b026934d81..27ae6bcc158ae5613a68684bc4a407b3b829397a 100644 (file)
@@ -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,