re-introduce profiling
This commit is contained in:
parent
e5d850cfc8
commit
ef8a143b61
2 changed files with 52 additions and 43 deletions
|
|
@ -24,12 +24,16 @@ ac_add_options --enable-application=browser
|
||||||
ac_add_options --with-libclang-path="/usr/lib/llvm-9/lib"
|
ac_add_options --with-libclang-path="/usr/lib/llvm-9/lib"
|
||||||
ac_add_options --with-clang-path="/usr/bin/clang-9"
|
ac_add_options --with-clang-path="/usr/bin/clang-9"
|
||||||
|
|
||||||
|
# let's see if this works: make things backwards-compatible as much as possible
|
||||||
|
# TODO: check if this would also work when building on something newer to have it run on
|
||||||
|
# 16.04/xenial later on as well?
|
||||||
|
ac_add_options --enable-stdcxx-compat
|
||||||
|
|
||||||
# This supposedly speeds up compilation (We test through dogfooding anyway)
|
# This supposedly speeds up compilation (We test through dogfooding anyway)
|
||||||
ac_add_options --disable-tests
|
ac_add_options --disable-tests
|
||||||
ac_add_options --disable-debug
|
ac_add_options --disable-debug
|
||||||
|
|
||||||
# might cause issues for appimage/flatpak, so keep it unset
|
ac_add_options --prefix=/usr
|
||||||
# ac_add_options --prefix=/usr
|
|
||||||
ac_add_options --enable-release
|
ac_add_options --enable-release
|
||||||
ac_add_options --enable-hardening
|
ac_add_options --enable-hardening
|
||||||
ac_add_options --enable-rust-simd
|
ac_add_options --enable-rust-simd
|
||||||
|
|
@ -84,6 +88,7 @@ export CXXFLAGS+=" -g0"
|
||||||
export RUSTFLAGS="-Cdebuginfo=0"
|
export RUSTFLAGS="-Cdebuginfo=0"
|
||||||
|
|
||||||
# from ALARM
|
# from ALARM
|
||||||
|
# See https://bugzilla.mozilla.org/show_bug.cgi?id=1430094
|
||||||
ac_add_options --disable-webrtc
|
ac_add_options --disable-webrtc
|
||||||
|
|
||||||
END
|
END
|
||||||
|
|
|
||||||
|
|
@ -53,52 +53,52 @@ cargo install cbindgen
|
||||||
rm -f mozconfig
|
rm -f mozconfig
|
||||||
|
|
||||||
# Do 3-tier PGO
|
# Do 3-tier PGO
|
||||||
# echo "Building instrumented browser..."
|
echo "Building instrumented browser..."
|
||||||
|
|
||||||
# if [[ $CARCH == 'aarch64' ]]; then
|
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
|
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
|
# Executes the actual build
|
||||||
# printf "\nBuilding LibreWolf\n";
|
printf "\nBuilding LibreWolf\n";
|
||||||
# ./mach build;
|
./mach build;
|
||||||
|
|
||||||
# echo "Profiling instrumented browser..."
|
echo "Profiling instrumented browser..."
|
||||||
# ./mach package
|
./mach package
|
||||||
# LLVM_PROFDATA=llvm-profdata \
|
LLVM_PROFDATA=llvm-profdata \
|
||||||
# JARLOG_FILE="$PWD/jarlog" \
|
JARLOG_FILE="$PWD/jarlog" \
|
||||||
# xvfb-run -s "-screen 0 1920x1080x24 -nolisten local" \
|
xvfb-run -s "-screen 0 1920x1080x24 -nolisten local" \
|
||||||
# ./mach python build/pgo/profileserver.py
|
./mach python build/pgo/profileserver.py
|
||||||
#
|
|
||||||
# if [[ ! -s merged.profdata ]]; then
|
if [[ ! -s merged.profdata ]]; then
|
||||||
# echo "No profile data produced."
|
echo "No profile data produced."
|
||||||
# exit 1
|
exit 1
|
||||||
# fi
|
fi
|
||||||
#
|
|
||||||
# if [[ ! -s jarlog ]]; then
|
if [[ ! -s jarlog ]]; then
|
||||||
# echo "No jar log produced."
|
echo "No jar log produced."
|
||||||
# exit 1
|
exit 1
|
||||||
# fi
|
fi
|
||||||
#
|
|
||||||
# echo "Removing instrumented browser..."
|
echo "Removing instrumented browser..."
|
||||||
# ./mach clobber
|
./mach clobber
|
||||||
#
|
|
||||||
# echo "Building optimized browser..."
|
echo "Building optimized browser..."
|
||||||
|
|
||||||
if [[ $CARCH == 'aarch64' ]]; then
|
if [[ $CARCH == 'aarch64' ]]; then
|
||||||
|
|
||||||
|
|
@ -114,6 +114,10 @@ END
|
||||||
else
|
else
|
||||||
|
|
||||||
cat >.mozconfig ${CI_PROJECT_DIR}/mozconfig - <<END
|
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
|
ac_add_options --enable-linker=gold
|
||||||
END
|
END
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue