From 3ab706cac3f3adeb4c0476b6c62c8b7f491f7650 Mon Sep 17 00:00:00 2001 From: Ben Wiederhake Date: Sun, 13 Sep 2020 23:36:43 +0200 Subject: [PATCH] Travis: Strip every executable This cuts down the size of a Toolchain cache entry by another quarter. (About 250 MiB to about 190 MiB). --- Toolchain/BuildIt.sh | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/Toolchain/BuildIt.sh b/Toolchain/BuildIt.sh index 19c535a2ab..4051398c58 100755 --- a/Toolchain/BuildIt.sh +++ b/Toolchain/BuildIt.sh @@ -289,18 +289,10 @@ pushd "$DIR" else mkdir -p Cache/ # 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. - pushd "Local/libexec/gcc/i686-pc-serenity/${GCC_VERSION}" - for binary in cc1 cc1plus lto1; do - echo "Before: $(du -h "${binary}")" - 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}")" + # This cuts the uncompressed size from 1.2 GiB per Toolchain down to about 190 MiB. + echo "Before: $(du -sh Local)" + find Local/ -type f -executable ! -name '*.la' ! -name '*.sh' ! -name 'mk*' -exec strip {} + + echo "After: $(du -sh Local)" tar czf "Cache/ToolchainLocal_${DEPS_HASH}.tar.gz" Local/ fi fi