firefox 84.0.1 enabled PGO and LTO
This commit is contained in:
@@ -4,33 +4,41 @@
|
||||
# Licensed under the GNU General Public License, version 3.
|
||||
# See the file http://www.gnu.org/licenses/gpl.txt
|
||||
|
||||
import subprocess
|
||||
|
||||
from pisi.actionsapi import get
|
||||
from pisi.actionsapi import autotools
|
||||
from pisi.actionsapi import pisitools
|
||||
from pisi.actionsapi import shelltools
|
||||
|
||||
#WorkDir = "mozilla-release-6b51784853e47e091d213d421a19cb623af718f0"
|
||||
ObjDir = "build"
|
||||
ObjDir = "objdir"
|
||||
locales = "az bs ca da de el en-US en-GB es-AR es-CL es-ES fi fr hr hu it lt nl pl pt-BR pt-PT ro ru sr sv-SE tr uk".split()
|
||||
xpidir = "%s/xpi" % get.workDIR()
|
||||
arch = get.ARCH()
|
||||
ver = ".".join(get.srcVERSION().split(".")[:3])
|
||||
|
||||
jobs = jobs = "-j"+ subprocess.check_output("nproc 2>/dev/null", shell=True).rstrip("\n")
|
||||
|
||||
shelltools.export("SHELL", "/bin/sh")
|
||||
shelltools.export("MACH_USE_SYSTEM_PYTHON", "1")
|
||||
|
||||
def setup():
|
||||
|
||||
shelltools.system("echo 'Instrumenting Firefox for PGO'")
|
||||
shelltools.system("cp mozconfig-inst .mozconfig")
|
||||
|
||||
# Google API key
|
||||
shelltools.echo("google_api_key", "AIzaSyBINKL31ZYd8W5byPuwTXYK6cEyoceGh6Y")
|
||||
pisitools.dosed(".mozconfig", "%%PWD%%", get.curDIR())
|
||||
pisitools.dosed(".mozconfig", "%%FILE%%", "google_api_key")
|
||||
pisitools.dosed(".mozconfig", "##JOBCOUNT##", get.makeJOBS())
|
||||
pisitools.dosed(".mozconfig", "##JOBCOUNT##", jobs)
|
||||
|
||||
# LOCALE
|
||||
shelltools.system("rm -rf langpack-ff/*/browser/defaults")
|
||||
if not shelltools.isDirectory(xpidir): shelltools.makedirs(xpidir)
|
||||
for locale in locales:
|
||||
shelltools.system("wget -c -P %s http://ftp.mozilla.org/pub/mozilla.org/firefox/releases/%s/linux-%s/xpi/%s.xpi" % (xpidir, ver, arch, locale))
|
||||
shelltools.system("wget -c -P %s https://download-origin.cdn.mozilla.net/pub/firefox/releases/%s/linux-%s/xpi/%s.xpi" % (xpidir, ver, arch, locale))
|
||||
#shelltools.makedirs("langpack-ff/langpack-%s@firefox.mozilla.org" % locale)
|
||||
shelltools.makedirs("langpack-ff")
|
||||
#shelltools.system("unzip -uo %s/%s.xpi -d langpack-ff/langpack-%s@firefox.mozilla.org" % (xpidir, locale, locale))
|
||||
@@ -39,21 +47,42 @@ def setup():
|
||||
#shelltools.copy("browserconfig.properties", "langpack-ff/langpack-%s@firefox.mozilla.org/browser/chrome/%s/locale/branding/" % (locale, locale))
|
||||
shelltools.copy("browserconfig.properties", "browser/branding/official/locales/")
|
||||
|
||||
shelltools.makedirs(ObjDir)
|
||||
shelltools.cd(ObjDir)
|
||||
#shelltools.makedirs(ObjDir)
|
||||
#shelltools.cd(ObjDir)
|
||||
|
||||
shelltools.system("../configure --prefix=/usr --libdir=/usr/lib --disable-strip --disable-install-strip")
|
||||
#shelltools.system("../configure --prefix=/usr --libdir=/usr/lib --disable-strip --disable-install-strip")
|
||||
|
||||
|
||||
def build():
|
||||
shelltools.cd(ObjDir)
|
||||
shelltools.system("../mach build -j5")
|
||||
shelltools.system("echo 'Building instrumented browser'")
|
||||
#shelltools.cd(ObjDir)
|
||||
shelltools.system("./mach build")
|
||||
|
||||
shelltools.system("echo 'Profiling instrumented browser...'")
|
||||
shelltools.system("./mach package")
|
||||
shelltools.system("LLVM_PROFDATA=llvm-profdata \
|
||||
JARLOG_FILE='%s/jarlog' \
|
||||
xvfb-run -s '-screen 0 1920x1080x24 -nolisten local' \
|
||||
./mach python build/pgo/profileserver.py" %get.curDIR())
|
||||
|
||||
shelltools.system("echo 'Removing instrumented browser...'")
|
||||
shelltools.system("./mach clobber")
|
||||
|
||||
shelltools.system("echo 'Building optimized browser...'")
|
||||
shelltools.system("rm .mozconfig")
|
||||
shelltools.system("cp mozconfig-opt .mozconfig")
|
||||
#shelltools.echo("google_api_key", "AIzaSyBINKL31ZYd8W5byPuwTXYK6cEyoceGh6Y")
|
||||
pisitools.dosed(".mozconfig", "%%PWD%%", get.curDIR())
|
||||
pisitools.dosed(".mozconfig", "%%FILE%%", "google_api_key")
|
||||
pisitools.dosed(".mozconfig", "##JOBCOUNT##", jobs)
|
||||
#shelltools.system("../configure --prefix=/usr --libdir=/usr/lib --disable-strip --disable-install-strip")
|
||||
shelltools.system("./mach build")
|
||||
|
||||
def install():
|
||||
shelltools.cd(ObjDir)
|
||||
shelltools.system("DESTDIR=%s ../mach install " % get.installDIR())
|
||||
#shelltools.cd(ObjDir)
|
||||
shelltools.system("DESTDIR=%s ./mach install " % get.installDIR())
|
||||
|
||||
shelltools.cd("..")
|
||||
#shelltools.cd("..")
|
||||
|
||||
# Install language packs
|
||||
pisitools.insinto("/usr/lib/firefox/browser/extensions", "./langpack-ff/*")
|
||||
|
||||
Executable
+58
@@ -0,0 +1,58 @@
|
||||
. $topsrcdir/browser/config/mozconfig
|
||||
mk_add_options MOZ_MAKE_FLAGS="##JOBCOUNT##"
|
||||
|
||||
ac_add_options --prefix=/usr
|
||||
ac_add_options --enable-release
|
||||
#ac_add_options --enable-linker=gold
|
||||
ac_add_options --enable-hardening
|
||||
ac_add_options --enable-optimize
|
||||
|
||||
export MOZ_NOSPAM=1
|
||||
export MOZBUILD_STATE_PATH="%%PWD%%/mozbuild"
|
||||
|
||||
export CC=clang
|
||||
export CXX=clang++
|
||||
export AR=llvm-ar
|
||||
export NM=llvm-nm
|
||||
export RANLIB=llvm-ranlib
|
||||
export LDFLAGS+=" -fuse-ld=lld"
|
||||
ac_add_options --allow-addon-sideload
|
||||
ac_add_options --enable-official-branding
|
||||
|
||||
# System libraries
|
||||
ac_add_options --with-system-nspr
|
||||
ac_add_options --with-system-nss
|
||||
#ac_add_options --with-system-icu
|
||||
ac_add_options --with-system-jpeg
|
||||
ac_add_options --with-system-zlib
|
||||
#ac_add_options --with-system-bz2
|
||||
#ac_add_options --with-system-libevent
|
||||
#ac_add_options --with-system-libvpx
|
||||
#ac_add_options --enable-system-hunspell
|
||||
ac_add_options --enable-system-ffi
|
||||
#ac_add_options --enable-system-pixman
|
||||
#ac_add_options --enable-system-sqlite
|
||||
#ac_add_options --enable-gstreamer=1.0
|
||||
#ac_add_options --disable-elf-hack
|
||||
|
||||
# Features
|
||||
#ac_add_options --enable-application=browser
|
||||
#ac_add_options --enable-alsa
|
||||
#ac_add_options --enable-jack
|
||||
#ac_add_options --enable-startup-notification
|
||||
ac_add_options --disable-updater
|
||||
ac_add_options --disable-crashreporter
|
||||
#ac_add_options --disable-stylo
|
||||
#ac_add_options --disable-gconf
|
||||
ac_add_options --disable-tests
|
||||
|
||||
# New MP4, etc
|
||||
ac_add_options --enable-rust-simd
|
||||
|
||||
ac_add_options --enable-profile-generate=cross
|
||||
|
||||
ac_add_options --with-google-location-service-api-keyfile="%%PWD%%/%%FILE%%"
|
||||
ac_add_options --with-google-safebrowsing-api-keyfile="%%PWD%%/%%FILE%%"
|
||||
#ac_add_options --enable-safe-browsing
|
||||
|
||||
mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/objdir
|
||||
Executable
+63
@@ -0,0 +1,63 @@
|
||||
. $topsrcdir/browser/config/mozconfig
|
||||
mk_add_options MOZ_MAKE_FLAGS="##JOBCOUNT##"
|
||||
|
||||
ac_add_options --prefix=/usr
|
||||
ac_add_options --enable-release
|
||||
#ac_add_options --enable-linker=gold
|
||||
ac_add_options --enable-hardening
|
||||
ac_add_options --enable-optimize
|
||||
|
||||
export MOZ_NOSPAM=1
|
||||
export MOZBUILD_STATE_PATH="%%PWD%%/mozbuild"
|
||||
|
||||
export CC=clang
|
||||
export CXX=clang++
|
||||
export AR=llvm-ar
|
||||
export NM=llvm-nm
|
||||
export RANLIB=llvm-ranlib
|
||||
export LDFLAGS+=" -fuse-ld=lld"
|
||||
ac_add_options --allow-addon-sideload
|
||||
ac_add_options --enable-official-branding
|
||||
|
||||
# System libraries
|
||||
ac_add_options --with-system-nspr
|
||||
ac_add_options --with-system-nss
|
||||
#ac_add_options --with-system-icu
|
||||
ac_add_options --with-system-jpeg
|
||||
ac_add_options --with-system-zlib
|
||||
#ac_add_options --with-system-bz2
|
||||
#ac_add_options --with-system-libevent
|
||||
#ac_add_options --with-system-libvpx
|
||||
#ac_add_options --enable-system-hunspell
|
||||
ac_add_options --enable-system-ffi
|
||||
#ac_add_options --enable-system-pixman
|
||||
#ac_add_options --enable-system-sqlite
|
||||
#ac_add_options --enable-gstreamer=1.0
|
||||
#ac_add_options --disable-elf-hack
|
||||
|
||||
# Features
|
||||
#ac_add_options --enable-application=browser
|
||||
#ac_add_options --enable-alsa
|
||||
#ac_add_options --enable-jack
|
||||
#ac_add_options --enable-startup-notification
|
||||
ac_add_options --disable-updater
|
||||
ac_add_options --disable-crashreporter
|
||||
#ac_add_options --disable-stylo
|
||||
#ac_add_options --disable-gconf
|
||||
ac_add_options --disable-tests
|
||||
|
||||
# New MP4, etc
|
||||
ac_add_options --enable-rust-simd
|
||||
|
||||
ac_add_options --enable-lto=cross
|
||||
ac_add_options --enable-profile-use=cross
|
||||
ac_add_options --with-pgo-profile-path=%%PWD%%/merged.profdata
|
||||
ac_add_options --with-pgo-jarlog=%%PWD%%/jarlog
|
||||
|
||||
|
||||
|
||||
ac_add_options --with-google-location-service-api-keyfile="%%PWD%%/%%FILE%%"
|
||||
ac_add_options --with-google-safebrowsing-api-keyfile="%%PWD%%/%%FILE%%"
|
||||
#ac_add_options --enable-safe-browsing
|
||||
|
||||
mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/objdir
|
||||
@@ -18,7 +18,9 @@
|
||||
<Archive sha1sum="7cdea9c1fe611547b281a8f1cdabb985c64144e1" type="tarxz">https://ftp.mozilla.org/pub/firefox/releases/84.0.1/source/firefox-84.0.1.source.tar.xz</Archive>
|
||||
<AdditionalFiles>
|
||||
<!--Our main configure script. Configure paramters are stored here.-->
|
||||
<AdditionalFile target=".mozconfig" permission="0644">mozconfig</AdditionalFile>
|
||||
<!-- <AdditionalFile target=".mozconfig" permission="0644">mozconfig</AdditionalFile> -->
|
||||
<AdditionalFile target="mozconfig-inst" permission="0644">mozconfig-inst</AdditionalFile>
|
||||
<AdditionalFile target="mozconfig-opt" permission="0644">mozconfig-opt</AdditionalFile>
|
||||
<AdditionalFile target="configure" permission="0755">configure</AdditionalFile>
|
||||
<AdditionalFile target="browserconfig.properties" permission="0644">pisilinux/browserconfig.properties</AdditionalFile> <!--anasayfa ayarlaması-->
|
||||
</AdditionalFiles>
|
||||
@@ -62,6 +64,11 @@
|
||||
<Dependency>llvm</Dependency>
|
||||
<Dependency>libxkbcommon-devel</Dependency>
|
||||
<Dependency>llvm-clang-devel</Dependency>
|
||||
<Dependency>lld-devel</Dependency>
|
||||
<Dependency>compiler-rt</Dependency>
|
||||
<Dependency>xorg-server-xvfb</Dependency>
|
||||
<Dependency>xorg-app</Dependency>
|
||||
<Dependency>xkeyboard-config</Dependency>
|
||||
<!--clang-->
|
||||
<Dependency>gdb-devel</Dependency>
|
||||
</BuildDependencies>
|
||||
@@ -550,6 +557,13 @@
|
||||
</Package>
|
||||
|
||||
<History>
|
||||
<Update release="51">
|
||||
<Date>2021-01-02</Date>
|
||||
<Version>84.0.1</Version>
|
||||
<Comment>Version bump and enable PGO and LTO</Comment>
|
||||
<Name>İdris Kalp</Name>
|
||||
<Email>idriskalp@gmail.com</Email>
|
||||
</Update>
|
||||
<Update release="50">
|
||||
<Date>2020-12-27</Date>
|
||||
<Version>84.0.1</Version>
|
||||
|
||||
Reference in New Issue
Block a user