diff options
author | Ben Wiederhake <BenWiederhake.GitHub@gmx.de> | 2021-03-11 23:04:59 +0100 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-03-13 22:42:20 +0100 |
commit | 100ce8fc1f5155b6551b25b18c7d3282f735748e (patch) | |
tree | 0bbe3f3f8b2a99e58072894e0265c31bfc7de4b3 /Toolchain | |
parent | 33e3f0c71ff1914424b6baf24371823654537e01 (diff) | |
download | serenity-100ce8fc1f5155b6551b25b18c7d3282f735748e.zip |
Toolchain: Always strip compiler, not just on CI
Diffstat (limited to 'Toolchain')
-rwxr-xr-x | Toolchain/BuildIt.sh | 26 |
1 files changed, 16 insertions, 10 deletions
diff --git a/Toolchain/BuildIt.sh b/Toolchain/BuildIt.sh index 34e747a1cb..c8f0cb5024 100755 --- a/Toolchain/BuildIt.sh +++ b/Toolchain/BuildIt.sh @@ -274,6 +274,22 @@ pushd "$DIR/Build/$ARCH" popd +# == STRIP BINARIES TO SAVE SPACE == + +pushd "$DIR" + # Stripping doesn't seem to work on macOS. + if [ "$(uname)" != "Darwin" ]; then + # 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 120 MiB. + # Hence, this might actually cause marginal speedups, although the point is to not waste space as blatantly. + echo "Stripping executables ..." + echo "Before: $(du -sh Local)" + find Local/ -type f -executable ! -name '*.la' ! -name '*.sh' ! -name 'mk*' -exec strip {} + + echo "After: $(du -sh Local)" + fi +popd + + # == SAVE TO CACHE == pushd "$DIR" @@ -283,16 +299,6 @@ pushd "$DIR" rm -f "${CACHED_TOOLCHAIN_ARCHIVE}" # Just in case - # Stripping doesn't seem to work on macOS. - # However, this doesn't seem to be necessary on macOS, the uncompressed size is already about 210 MiB. - if [ "$(uname)" != "Darwin" ]; then - # 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 190 MiB. - echo "Stripping executables ..." - echo "Before: $(du -sh Local)" - find Local/ -type f -executable ! -name '*.la' ! -name '*.sh' ! -name 'mk*' -exec strip {} + - echo "After: $(du -sh Local)" - fi tar czf "${CACHED_TOOLCHAIN_ARCHIVE}" Local/ echo "Cache (after):" |