mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 03:07:43 +00:00
Toolchain: Always strip compiler, not just on CI
This commit is contained in:
parent
33e3f0c71f
commit
100ce8fc1f
1 changed files with 16 additions and 10 deletions
|
@ -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):"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue