Merge branch 'run_command-check' into 'main'

meson: specify when commands need to succeed in run_command

See merge request GNOME/glib!2360
This commit is contained in:
Philip Withnall 2021-11-24 10:31:41 +00:00
commit 6bdb06ff4b

View File

@ -17,7 +17,7 @@ if build_machine.system() == 'linux'
libutil_name = 'libutil'
libutil = run_command('sh', '-c',
'''ldconfig -p | grep -o "[[:space:]]@0@\.so\(\.[0-9]\+\)\?\b"'''
.format(libutil_name)).stdout().strip().split('\n')
.format(libutil_name), check: false).stdout().strip().split('\n')
if libutil.length() > 0
message('Found libutil as @0@'.format(libutil[0]))
@ -683,7 +683,7 @@ if not meson.is_cross_build() or meson.has_exe_wrapper()
objcopy_supports_add_symbol = false
objcopy = find_program('objcopy', required : false)
if objcopy.found()
objcopy_supports_add_symbol = run_command(objcopy, '--help').stdout().contains('--add-symbol')
objcopy_supports_add_symbol = run_command(objcopy, '--help', check: true).stdout().contains('--add-symbol')
endif
ld = find_program('ld', required : false)