build: Add check parameter to run_command()

This handles a meson warning
This commit is contained in:
Marco Trevisan (Treviño) 2024-02-14 22:40:35 +01:00 committed by Marco Trevisan
parent e229030c34
commit d1a6e92582

View file

@ -44,12 +44,13 @@ endif
foreach libname: preloaded_libs
lib = run_command(meson.get_compiler('c'),
'-print-file-name=lib@0@.so'.format(libname)
'-print-file-name=lib@0@.so'.format(libname),
check: true,
).stdout().strip()
# Support linker script files
if run_command('grep', '-qI', '^INPUT', files(lib)).returncode() == 0
out = run_command('cat', lib).stdout()
if run_command('grep', '-qI', '^INPUT', files(lib), check: false).returncode() == 0
out = run_command('cat', lib, check: true).stdout()
lib = out.split('(')[1].split(')')[0].strip()
endif