mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-20 11:40:10 +01:00
meson: make nm binary optional
This makes nm not required, but used if found. In general I imagine that
this means that on windows nm wont be found, and on other platforms it
will.
v2: - fix gbm and egl symbols check tests to only be run if nm is found
- reword commit message to reflect the code change
Reviewed-by: Eric Anholt <eric@anholt.net>
This commit is contained in:
parent
f5eafc2dc6
commit
ff9bf223c2
5 changed files with 8 additions and 5 deletions
|
|
@ -1502,8 +1502,11 @@ endif
|
||||||
|
|
||||||
pkg = import('pkgconfig')
|
pkg = import('pkgconfig')
|
||||||
|
|
||||||
|
prog_nm = find_program('nm', required : false)
|
||||||
env_test = environment()
|
env_test = environment()
|
||||||
env_test.set('NM', find_program('nm').path())
|
if prog_nm.found()
|
||||||
|
env_test.set('NM', prog_nm.path())
|
||||||
|
endif
|
||||||
|
|
||||||
# This quirk needs to be applied to sources with functions defined in assembly
|
# 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
|
# as GCC LTO drops them. See: https://bugs.freedesktop.org/show_bug.cgi?id=109391
|
||||||
|
|
|
||||||
|
|
@ -192,7 +192,7 @@ pkg.generate(
|
||||||
extra_cflags : gl_pkgconfig_c_flags,
|
extra_cflags : gl_pkgconfig_c_flags,
|
||||||
)
|
)
|
||||||
|
|
||||||
if with_tests
|
if with_tests and prog_nm.found()
|
||||||
if with_glvnd
|
if with_glvnd
|
||||||
# TODO: add glvnd symbol check
|
# TODO: add glvnd symbol check
|
||||||
else
|
else
|
||||||
|
|
|
||||||
|
|
@ -66,7 +66,7 @@ pkg.generate(
|
||||||
libraries_private : '-ldl', # FIXME: autotools lists this a incomplete
|
libraries_private : '-ldl', # FIXME: autotools lists this a incomplete
|
||||||
)
|
)
|
||||||
|
|
||||||
if with_tests
|
if with_tests and prog_nm.found()
|
||||||
test(
|
test(
|
||||||
'gbm-symbols-check',
|
'gbm-symbols-check',
|
||||||
find_program('gbm-symbols-check'),
|
find_program('gbm-symbols-check'),
|
||||||
|
|
|
||||||
|
|
@ -52,7 +52,7 @@ pkg.generate(
|
||||||
libraries_private : gl_priv_libs,
|
libraries_private : gl_priv_libs,
|
||||||
)
|
)
|
||||||
|
|
||||||
if with_tests
|
if with_tests and prog_nm.found()
|
||||||
test(
|
test(
|
||||||
'es1-ABI-check',
|
'es1-ABI-check',
|
||||||
find_program('ABI-check'),
|
find_program('ABI-check'),
|
||||||
|
|
|
||||||
|
|
@ -52,7 +52,7 @@ pkg.generate(
|
||||||
libraries_private : gl_priv_libs,
|
libraries_private : gl_priv_libs,
|
||||||
)
|
)
|
||||||
|
|
||||||
if with_tests
|
if with_tests and prog_nm.found()
|
||||||
test(
|
test(
|
||||||
'es2-ABI-check',
|
'es2-ABI-check',
|
||||||
find_program('ABI-check'),
|
find_program('ABI-check'),
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue