Travis: Strip every executable

This cuts down the size of a Toolchain cache entry by another quarter.
(About 250 MiB to about 190 MiB).
This commit is contained in:
Ben Wiederhake 2020-09-13 23:36:43 +02:00 committed by Andreas Kling
parent f067fb0aef
commit 3ab706cac3

View file

@ -289,18 +289,10 @@ pushd "$DIR"
else else
mkdir -p Cache/ mkdir -p Cache/
# We *most definitely* don't need debug symbols in the linker/compiler. # We *most definitely* don't need debug symbols in the linker/compiler.
# This cuts the uncompressed size from 1.2 GiB per Toolchain down to about 250 MiB. # This cuts the uncompressed size from 1.2 GiB per Toolchain down to about 190 MiB.
pushd "Local/libexec/gcc/i686-pc-serenity/${GCC_VERSION}" echo "Before: $(du -sh Local)"
for binary in cc1 cc1plus lto1; do find Local/ -type f -executable ! -name '*.la' ! -name '*.sh' ! -name 'mk*' -exec strip {} +
echo "Before: $(du -h "${binary}")" echo "After: $(du -sh Local)"
strip "${binary}"
echo "After: $(du -h "${binary}")"
done
popd
binary=Local/bin/i686-pc-serenity-lto-dump
echo "Before: $(du -h "${binary}")"
strip "${binary}"
echo "After: $(du -h "${binary}")"
tar czf "Cache/ToolchainLocal_${DEPS_HASH}.tar.gz" Local/ tar czf "Cache/ToolchainLocal_${DEPS_HASH}.tar.gz" Local/
fi fi
fi fi