mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-01-23 20:46:14 +01:00
meson: specify when commands need to succeed in run_command
meson in git master now warns about a missing `check:` kwarg, and may eventually change the default from false to true. Take the opportunity to require `objcopy --help` to succeed -- it is unlikely to fail, but if it does something insane happened.
This commit is contained in:
parent
467bcacc56
commit
b248f3481c
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user