diff options
author | ohfp <1813007-ohfp@users.noreply.gitlab.com> | 2020-03-29 18:37:23 +0200 |
---|---|---|
committer | ohfp <1813007-ohfp@users.noreply.gitlab.com> | 2020-03-30 00:26:30 +0200 |
commit | 85f55868f631d67e5a4ab190f69e919f38be57f8 (patch) | |
tree | 4b91a6ed7ef90064c835403d5e1af952f8bff43b /binary_tarball/scripts/4_Build_Binary_Tarball.sh | |
parent | re-introduce profiling (diff) | |
download | librewolf-linux-85f55868f631d67e5a4ab190f69e919f38be57f8.tar.gz librewolf-linux-85f55868f631d67e5a4ab190f69e919f38be57f8.tar.bz2 librewolf-linux-85f55868f631d67e5a4ab190f69e919f38be57f8.zip |
Disable PGO for deb/ubuntu, because everything is horrible.
Also: Grab dependencies, patches and further config options from ubuntu
upstream build sources. Builds statically against a
mozilla-gcc-7/libstdc++7. Let's hope this works for Appimages and
Flatpaks as well, "everywhere".
Diffstat (limited to 'binary_tarball/scripts/4_Build_Binary_Tarball.sh')
-rwxr-xr-x | binary_tarball/scripts/4_Build_Binary_Tarball.sh | 66 |
1 files changed, 5 insertions, 61 deletions
diff --git a/binary_tarball/scripts/4_Build_Binary_Tarball.sh b/binary_tarball/scripts/4_Build_Binary_Tarball.sh index d7649e4..cd1bed3 100755 --- a/binary_tarball/scripts/4_Build_Binary_Tarball.sh +++ b/binary_tarball/scripts/4_Build_Binary_Tarball.sh @@ -41,72 +41,20 @@ export SHELL=/bin/bash; cd $srcdir; # Runs bootstrapper to install dependencies -printf "\nRunning bootstrapper to install build dependencies (using ./mach script within source code)\n"; -./mach bootstrap --application-choice=browser --no-interactive +# printf "\nRunning bootstrapper to install build dependencies (using ./mach script within source code)\n"; +# ./mach bootstrap --application-choice=browser --no-interactive + +# ./mach configure # add cargo binary to path -source /root/.cargo/env +# source /root/.cargo/env # install cbindgen cargo install cbindgen -rm -f mozconfig - -# Do 3-tier PGO -echo "Building instrumented browser..." - -if [[ $CARCH == 'aarch64' ]]; then - -cat >.mozconfig ${CI_PROJECT_DIR}/mozconfig - <<END -ac_add_options --enable-profile-generate -END - -else - -# -fno-plt with cross-LTO causes obscure LLVM errors -# LLVM ERROR: Function Import: link error -CFLAGS="${CFLAGS/-fno-plt/}" -CXXFLAGS="${CXXFLAGS/-fno-plt/}" - -cat >.mozconfig ${CI_PROJECT_DIR}/mozconfig - <<END -ac_add_options --enable-profile-generate=cross -END - -fi - -# Executes the actual build -printf "\nBuilding LibreWolf\n"; -./mach build; - -echo "Profiling instrumented browser..." -./mach package -LLVM_PROFDATA=llvm-profdata \ - JARLOG_FILE="$PWD/jarlog" \ - xvfb-run -s "-screen 0 1920x1080x24 -nolisten local" \ - ./mach python build/pgo/profileserver.py - -if [[ ! -s merged.profdata ]]; then - echo "No profile data produced." - exit 1 -fi - -if [[ ! -s jarlog ]]; then - echo "No jar log produced." - exit 1 -fi - -echo "Removing instrumented browser..." -./mach clobber - -echo "Building optimized browser..." - if [[ $CARCH == 'aarch64' ]]; then cat >.mozconfig ${CI_PROJECT_DIR}/mozconfig - <<END -ac_add_options --enable-lto -ac_add_options --enable-profile-use -ac_add_options --with-pgo-profile-path=${PWD@Q}/merged.profdata -ac_add_options --with-pgo-jarlog=${PWD@Q}/jarlog # seems to break on arm # ac_add_options --enable-linker=gold END @@ -114,10 +62,6 @@ END else cat >.mozconfig ${CI_PROJECT_DIR}/mozconfig - <<END -ac_add_options --enable-lto=cross -ac_add_options --enable-profile-use=cross -ac_add_options --with-pgo-profile-path=${PWD@Q}/merged.profdata -ac_add_options --with-pgo-jarlog=${PWD@Q}/jarlog ac_add_options --enable-linker=gold END |