From 6e2f2cd8b116b6e06e6bcda094cedf77e6c8c771 Mon Sep 17 00:00:00 2001 From: xackus <14938807+xackus@users.noreply.github.com> Date: Sat, 17 Apr 2021 21:28:02 +0200 Subject: [PATCH] Toolchain: Don't produce debug symbols Previously debug symbols were produced and then stripped. --- Toolchain/BuildIt.sh | 22 ++++++---------------- 1 file changed, 6 insertions(+), 16 deletions(-) diff --git a/Toolchain/BuildIt.sh b/Toolchain/BuildIt.sh index 9133c122f2..4329f39817 100755 --- a/Toolchain/BuildIt.sh +++ b/Toolchain/BuildIt.sh @@ -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"