Toolchain: Don't produce debug symbols

Previously debug symbols were produced and then stripped.
This commit is contained in:
xackus 2021-04-17 21:28:02 +02:00 committed by Andreas Kling
parent 3c4dc5cb11
commit 6e2f2cd8b1
Notes: sideshowbarker 2024-07-18 19:24:48 +09:00

View File

@ -28,6 +28,12 @@ fi
SYSTEM_NAME="$(uname -s)"
# 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.
export CFLAGS="-g0"
export CXXFLAGS="-g0"
if [ "$SYSTEM_NAME" = "OpenBSD" ]; then
MAKE=gmake
MD5SUM="md5 -q"
@ -315,22 +321,6 @@ pushd "$DIR/Build/$ARCH"
popd
# == STRIP BINARIES TO SAVE SPACE ==
pushd "$DIR"
# Stripping doesn't seem to work on macOS.
if [ "$SYSTEM_NAME" != "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"