firefox: disable debug packages when built on 32-bit hosts.

cc1plus runs out of memory otherwise:
cargo:warning=cc1plus: out of memory allocating 65536 bytes after a total of 1010126848 bytes
This commit is contained in:
Érico Nogueira 2021-04-02 15:17:30 -03:00
parent 48be91d3d1
commit 3acf4981df

View file

@ -40,6 +40,12 @@ if [ "$XBPS_TARGET_NO_ATOMIC8" ]; then
makedepends+=" libatomic-devel"
fi
# work around large debug symbols on 32-bit hosts
# cargo:warning=cc1plus: out of memory allocating 65536 bytes after a total of 1010126848 bytes
if [ "$XBPS_WORDSIZE" = "32" ]; then
nodebug=yes
fi
# we need this because cargo verifies checksums of all files in vendor
# crates when it builds and gives us no way to override or update the
# file sanely... so just clear out the file list
@ -129,8 +135,6 @@ do_build() {
# work around large debug symbols on 32-bit hosts
if [ "$XBPS_WORDSIZE" = "32" ]; then
export CFLAGS="${CFLAGS/-g/-g1}"
export CXXFLAGS="${CXXFLAGS/-g/-g1}"
export LDFLAGS+=" -Wl,--no-keep-memory"
# patch the rust debug level, this is hardcoded
vsed -i 's/debug_info = "2"/debug_info = "0"/' \