mirror of
https://github.com/SerenityOS/serenity.git
synced 2025-01-23 01:41:59 -05:00
Toolchain: Don't produce debug symbols
Previously debug symbols were produced and then stripped.
This commit is contained in:
parent
3c4dc5cb11
commit
6e2f2cd8b1
1 changed files with 6 additions and 16 deletions
|
@ -28,6 +28,12 @@ fi
|
||||||
|
|
||||||
SYSTEM_NAME="$(uname -s)"
|
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
|
if [ "$SYSTEM_NAME" = "OpenBSD" ]; then
|
||||||
MAKE=gmake
|
MAKE=gmake
|
||||||
MD5SUM="md5 -q"
|
MD5SUM="md5 -q"
|
||||||
|
@ -315,22 +321,6 @@ pushd "$DIR/Build/$ARCH"
|
||||||
popd
|
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 ==
|
# == SAVE TO CACHE ==
|
||||||
|
|
||||||
pushd "$DIR"
|
pushd "$DIR"
|
||||||
|
|
Loading…
Reference in a new issue