process-lto: add explicit diagnostics about failed strip

While strip is verbose when it fails to process files,
it's not quite obvious that it exits with a non-zero status,
hence an explicit diagnostics message might be useful.
This commit is contained in:
Дмитрий Левин 2021-09-08 08:00:00 +00:00
parent 8c5c47a2a1
commit 457de4ae02

View File

@ -19,7 +19,8 @@ mkdir -p .tmp
# If there is only slim lto, strip will produce "plugin needed to handle lto
# object" warning, because of stripping __gnu_lto_v1 symbol while remaining
# __gnu_lto_slim.
strip -p -R '.gnu.lto_*' -R '.gnu.debuglto_*' -N '__gnu_lto_v1' "$@"
strip -p -R '.gnu.lto_*' -R '.gnu.debuglto_*' -N '__gnu_lto_v1' -- "$@" ||
Fatal 'strip failed'
# Verify that we still have exportable symbols.
suggest="Perhaps, you need to %global optflags_lto %optflags_lto -ffat-lto-objects"