mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-22 07:30:19 +00:00
Toolchain: Always strip compiler, not just on CI
This commit is contained in:
parent
33e3f0c71f
commit
100ce8fc1f
Notes:
sideshowbarker
2024-07-18 21:23:49 +09:00
Author: https://github.com/BenWiederhake Commit: https://github.com/SerenityOS/serenity/commit/100ce8fc1f5 Pull-request: https://github.com/SerenityOS/serenity/pull/5742 Reviewed-by: https://github.com/ADKaster ✅
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…
Reference in a new issue