#!/bin/bash printf "\n\n--------------------------------------- BUILD -----------------------------------------------\n"; # Setup Script Variables srcdir=$1; OUTPUT_TARBALL=$2; CI_PROJECT_DIR=${CI_PROJECT_DIR:-$(realpath $(dirname $0)/../../)} _SOURCE_CODE_BINARY_TARBALL_LOCATION="./obj*/dist/librewolf*.tar.bz2"; export MOZ_NOSPAM=1 export MOZBUILD_STATE_PATH="$srcdir/mozbuild" # LTO needs more open files ulimit -n 4096 # -fno-plt with cross-LTO causes obscure LLVM errors # LLVM ERROR: Function Import: link error CFLAGS="${CFLAGS/-fno-plt/}" CXXFLAGS="${CXXFLAGS/-fno-plt/}" # Prevents build from breaking in CI/CD environments export SHELL=/bin/bash; # Changes current folder to the source code folder cd $srcdir; # Do 3-tier PGO echo "Building instrumented browser..." if [[ $CARCH == 'aarch64' ]]; then cat >.mozconfig ../mozconfig - <.mozconfig ../mozconfig - <.mozconfig ../mozconfig - <.mozconfig ../mozconfig - <