diff options
author | ohfp <1813007-ohfp@users.noreply.gitlab.com> | 2020-03-29 16:52:39 +0200 |
---|---|---|
committer | ohfp <1813007-ohfp@users.noreply.gitlab.com> | 2020-03-29 16:52:39 +0200 |
commit | ef8a143b61cb7802d86de947d65dbdaf560bcac3 (patch) | |
tree | 70bf48ccd2daa8e597244167c465a3f5afbf461f /binary_tarball/scripts/4_Build_Binary_Tarball.sh | |
parent | try it with libstdc++6 (diff) | |
download | librewolf-linux-ef8a143b61cb7802d86de947d65dbdaf560bcac3.tar.gz librewolf-linux-ef8a143b61cb7802d86de947d65dbdaf560bcac3.tar.bz2 librewolf-linux-ef8a143b61cb7802d86de947d65dbdaf560bcac3.zip |
re-introduce profiling
Diffstat (limited to 'binary_tarball/scripts/4_Build_Binary_Tarball.sh')
-rwxr-xr-x | binary_tarball/scripts/4_Build_Binary_Tarball.sh | 92 |
1 files changed, 48 insertions, 44 deletions
diff --git a/binary_tarball/scripts/4_Build_Binary_Tarball.sh b/binary_tarball/scripts/4_Build_Binary_Tarball.sh index f393cfa..d7649e4 100755 --- a/binary_tarball/scripts/4_Build_Binary_Tarball.sh +++ b/binary_tarball/scripts/4_Build_Binary_Tarball.sh @@ -53,52 +53,52 @@ 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 -# -# cat >.mozconfig ${CI_PROJECT_DIR}/mozconfig - <<END -# # -fno-plt with cross-LTO causes obscure LLVM errors -# # LLVM ERROR: Function Import: link error -# # CFLAGS="${CFLAGS/-fno-plt/}" -# # CXXFLAGS="${CXXFLAGS/-fno-plt/}" -# -# ac_add_options --enable-profile-generate -# END - -# fi +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..." +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 @@ -114,6 +114,10 @@ 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 |