summaryrefslogtreecommitdiff
path: root/libre
diff options
context:
space:
mode:
authorbill-auger <mr.j.spam.me@gmail.com>2020-04-30 00:52:22 -0400
committerbill-auger <mr.j.spam.me@gmail.com>2020-04-30 00:52:22 -0400
commit7a7791c99f5d23722c04dbfa222bad9de1ab7e66 (patch)
tree33d8c4fd3123faa94088fbdd0951a9e8d40ebc88 /libre
parent977c88f7996b5509e1e34e10ef961f9a952f7835 (diff)
downloadabslibre-7a7791c99f5d23722c04dbfa222bad9de1ab7e66.tar.gz
abslibre-7a7791c99f5d23722c04dbfa222bad9de1ab7e66.tar.bz2
abslibre-7a7791c99f5d23722c04dbfa222bad9de1ab7e66.zip
[iceweasel]: refactor build env vars
Diffstat (limited to 'libre')
-rw-r--r--libre/iceweasel/PKGBUILD22
1 files changed, 13 insertions, 9 deletions
diff --git a/libre/iceweasel/PKGBUILD b/libre/iceweasel/PKGBUILD
index c8284fb5f..49b3be530 100644
--- a/libre/iceweasel/PKGBUILD
+++ b/libre/iceweasel/PKGBUILD
@@ -289,20 +289,18 @@ build() {
# LTO needs more open files
ulimit -n 4096
+ ## [ARCH-SPECIFIC BUILD ENV] ##
if [[ $CARCH != armv7h ]]; then
# -fno-plt with cross-LTO causes obscure LLVM errors
# LLVM ERROR: Function Import: link error
CFLAGS="${CFLAGS/-fno-plt/}"
CXXFLAGS="${CXXFLAGS/-fno-plt/}"
fi
-
if [[ $CARCH != i686 ]]; then
# DEBUG: clang-9: error: unknown argument: '-fvar-tracking-assignments'
CFLAGS="${CFLAGS/-fvar-tracking-assignments/}"
CXXFLAGS="${CXXFLAGS/-fvar-tracking-assignments/}"
fi
-
- ## [ARCH-SPECIFIC CONFIG] ##
case ${CARCH} in
armv7h)
export MOZ_DEBUG_FLAGS=" "
@@ -310,7 +308,17 @@ build() {
export CXXFLAGS+=" -g0"
export LDFLAGS+=" -Wl,--no-keep-memory -Wl,--reduce-memory-overheads"
export RUSTFLAGS="-Cdebuginfo=0"
+ ;;
+ i686)
+ # disable LTO (clang has issues on IA32)
+ export RUSTFLAGS+=" -Cdebuginfo=0 -Clto=off"
+ export LDFLAGS+=" -Wl,--no-keep-memory -Wl,--reduce-memory-overheads"
+ ;;
+ esac
+ ## [ARCH-SPECIFIC BUILD CONFIG] ##
+ case ${CARCH} in
+ armv7h)
# skipping PGO "instrumented browser"; so we have the final .mozconfig now
cp ../mozconfig .mozconfig
;;
@@ -320,10 +328,6 @@ build() {
# libmozsandbox.so: cannot open shared object file: No such file or directory
# Couldn't load XPCOM."
- # disable LTO and use gcc toolchain (clang has issues on IA32)
- export RUSTFLAGS+=" -Cdebuginfo=0 -Clto=off"
- export LDFLAGS+=" -Wl,--no-keep-memory -Wl,--reduce-memory-overheads"
-
# avoid excessive debug symbols in rust leading to out-of-memory situations
sed -i "s/debug_info = '\''2'\''/debug_info = '\''0'\''/" build/moz.configure/toolchain.configure
@@ -365,12 +369,12 @@ ac_add_options --with-pgo-profile-path=${PWD@Q}/merged.profdata
ac_add_options --with-pgo-jarlog=${PWD@Q}/jarlog
END
;;
- *) echo "no [ARCH-SPECIFIC CONFIG] for arch: ${CARCH}" ; return 1 ;
+ *) echo "no [ARCH-SPECIFIC BUILD CONFIG] for arch: ${CARCH}" ; return 1 ;
;;
esac
# sanity checks
- # each of the [ARCH-SPECIFIC CONFIG] branches above should have created .mozconfig
+ # each of the [ARCH-SPECIFIC BUILD CONFIG] branches above should have created .mozconfig
[[ ! -f .mozconfig ]] && echo ".mozconfig file not found in source root" && return 1
echo "Building optimized browser..."