summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO2
-rw-r--r--PKGBUILD61
-rwxr-xr-xupload-symbol-archive3
3 files changed, 46 insertions, 20 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 0ab423bd75cd..cf7234acb124 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,6 +1,6 @@
pkgbase = firefox-wayland-hg
pkgdesc = Standalone web browser from mozilla.org - mozilla-unified hg, nightly branding, targeting wayland
- pkgver = 123.0a1+20231230.1+h9660032084db
+ pkgver = 123.0a1+20240113.1+h23a77d3c25d7
pkgrel = 1
url = https://www.mozilla.org/firefox/channel/#nightly
arch = x86_64
diff --git a/PKGBUILD b/PKGBUILD
index f1377419553b..ba68dfa98c6d 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -11,6 +11,9 @@
# three-stage profile-guided optimization
: ${_build_pgo:=true}
+# reuse existing PGO profile
+: ${_build_pgo_reuse:=true}
+
# use mozilla-central repo, instead of mozilla-unified
: ${_build_nightly:=false}
@@ -27,7 +30,7 @@
## basic info
pkgname="firefox${_pkgtype:-}"
_pkgname=firefox-nightly
-pkgver=123.0a1+20231230.1+h9660032084db
+pkgver=123.0a1+20240113.1+h23a77d3c25d7
pkgrel=1
pkgdesc="Standalone web browser from mozilla.org"
url="https://www.mozilla.org/firefox/channel/#nightly"
@@ -266,36 +269,60 @@ build() {
if [[ "${_build_pgo::1}" == "t" ]] ; then
# Do 3-tier PGO
- echo "Building instrumented browser..."
- cat >.mozconfig ../mozconfig - <<END
-ac_add_options --enable-profile-generate=cross
-END
- ./mach build
+ local _old_profdata="${SRCDEST:-$startdir}/merged.profdata"
+ local _old_jarlog="${SRCDEST:-$startdir}/jarlog"
+
+ # Restore old profile
+ if [[ "${_build_pgo_reuse::1}" == "t" ]] ; then
+ if [[ -s "$_old_profdata" ]] ; then
+ echo "Restoring old profile data."
+ cp --reflink=auto -f "$_old_profdata" merged.profdata
+ fi
+
+ if [[ -s "$_old_jarlog" ]] ; then
+ echo "Restoring old jar log."
+ cp --reflink=auto -f "$_old_jarlog" jarlog
+ fi
+ fi
- echo "Profiling instrumented browser..."
- ./mach package
+ # Make new profile
+ if [[ "${_build_pgo_reuse::1}" != "t" ]] || [[ ! -s merged.profdata ]] ; then
+ echo "Building instrumented browser..."
+ cat >.mozconfig ../mozconfig
+ echo >>.mozconfig "ac_add_options --enable-profile-generate=cross"
+ ./mach build
- LLVM_PROFDATA=llvm-profdata JARLOG_FILE="$PWD/jarlog" \
- wlheadless-run -c weston --width=1920 --height=1080 \
- -- ./mach python build/pgo/profileserver.py
+ echo "Profiling instrumented browser..."
+ ./mach package
- echo "Removing instrumented browser..."
- ./mach clobber
+ LLVM_PROFDATA=llvm-profdata JARLOG_FILE="$PWD/jarlog" \
+ wlheadless-run -c weston --width=1920 --height=1080 \
+ -- ./mach python build/pgo/profileserver.py
+
+ echo "Removing instrumented browser..."
+ ./mach clobber
+ fi
echo "Building optimized browser..."
cat >.mozconfig ../mozconfig
if [[ -s merged.profdata ]] ; then
stat -c "Profile data found (%s bytes)" merged.profdata
- echo "ac_add_options --enable-profile-use=cross" >> .mozconfig
- echo "ac_add_options --with-pgo-profile-path='${PWD@Q}/merged.profdata'" >> .mozconfig
+ echo >>.mozconfig "ac_add_options --enable-profile-use=cross"
+ echo >>.mozconfig "ac_add_options --with-pgo-profile-path='${PWD@Q}/merged.profdata'"
+
+ # save profdata for reuse
+ cp --reflink=auto -f merged.profdata "$_old_profdata"
else
echo "Profile data not found."
fi
if [[ -s jarlog ]] ; then
stat -c "Jar log found (%s bytes)" jarlog
- echo "ac_add_options --with-pgo-jarlog='${PWD@Q}/jarlog'" >> .mozconfig
+ echo >>.mozconfig "ac_add_options --with-pgo-jarlog='${PWD@Q}/jarlog'"
+
+ # save jarlog for reuse
+ cp --reflink=auto -f jarlog "$_old_jarlog"
else
echo "Jar log not found."
fi
@@ -401,7 +428,7 @@ END
if [[ -f $SOCORRO_SYMBOL_UPLOAD_TOKEN_FILE ]]; then
make -C obj uploadsymbols
else
- cp -fvt "$startdir" obj/dist/*crashreporter-symbols-full.tar.zst
+ cp -fvt "$startdir" obj/dist/*crashreporter-symbols.zip
fi
}
diff --git a/upload-symbol-archive b/upload-symbol-archive
index 0402c7cf61d0..ce5dd521df93 100755
--- a/upload-symbol-archive
+++ b/upload-symbol-archive
@@ -12,7 +12,7 @@ shift
[[ -f $token && -s $token ]] || die "Invalid TOKEN-FILE ${token@Q}"
for archive; do
- [[ $(file -Ebi "$archive") == application/zstd* ]] || die "Invalid SYMBOL-ARCHIVE ${archive@Q}"
+ [[ $(file -Ebi "$archive") == application/zip* ]] || die "Invalid SYMBOL-ARCHIVE ${archive@Q}"
done
for archive; do
@@ -21,5 +21,4 @@ for archive; do
--retry 4 --retry-connrefused --connect-timeout 120 \
https://symbols.mozilla.org/upload/
echo
- mv -v "$archive" "$archive.uploaded"
done