[arch-commits] Commit in js78/trunk (PKGBUILD)
Jan Steffens
heftig at gemini.archlinux.org
Sun Jan 23 23:10:56 UTC 2022
Date: Sunday, January 23, 2022 @ 23:10:56
Author: heftig
Revision: 435018
78.15.0-3: Sync with js91
Modified:
js78/trunk/PKGBUILD
----------+
PKGBUILD | 86 +++++++++++++++++++++++++++++++------------------------------
1 file changed, 44 insertions(+), 42 deletions(-)
Modified: PKGBUILD
===================================================================
--- PKGBUILD 2022-01-23 22:57:37 UTC (rev 435017)
+++ PKGBUILD 2022-01-23 23:10:56 UTC (rev 435018)
@@ -2,7 +2,7 @@
pkgname=js78
pkgver=78.15.0
-pkgrel=2
+pkgrel=3
pkgdesc="JavaScript interpreter and libraries - Version 78"
arch=(x86_64)
url="https://spidermonkey.dev/"
@@ -27,8 +27,8 @@
COMPRESSZST+=(--long)
prepare() {
+ mkdir mozbuild
cd firefox-$pkgver
- mkdir obj
# Post-78 fixes to fix LTO with LLVM 11
patch -Np1 -i ../0001-Fixes-for-LTO-PGO-support.patch
@@ -38,52 +38,53 @@
# Fix build with Rust 1.56
patch -Np1 -i ../0003-Fixes-for-Rust-1.56.patch
+
+ cat >../mozconfig <<END
+ac_add_options --enable-application=js
+mk_add_options MOZ_OBJDIR=${PWD at Q}/obj
+
+ac_add_options --prefix=/usr
+ac_add_options --enable-release
+ac_add_options --enable-hardening
+ac_add_options --enable-optimize
+ac_add_options --enable-rust-simd
+ac_add_options --enable-linker=lld
+ac_add_options --disable-debug
+ac_add_options --disable-debug-symbols
+ac_add_options --disable-jemalloc
+ac_add_options --disable-strip
+
+# System libraries
+ac_add_options --with-system-zlib
+ac_add_options --without-system-icu
+
+# Features
+ac_add_options --enable-readline
+ac_add_options --enable-shared-js
+ac_add_options --enable-tests
+ac_add_options --with-intl-api
+END
}
build() {
- local configure_args=(
- --prefix=/usr
- --disable-debug
- --disable-debug-symbols
- --disable-jemalloc
- --disable-strip
- --enable-hardening
- --enable-linker=lld
- --enable-optimize
- --enable-readline
- --enable-release
- --enable-rust-simd
- --enable-shared-js
- --enable-tests
- --with-intl-api
- --with-system-zlib
- --without-system-icu
- )
+ cd firefox-$pkgver
- export CC=clang
- export CXX=clang++
- export AR=llvm-ar
- export NM=llvm-nm
- export RANLIB=llvm-ranlib
+ export MOZ_NOSPAM=1
+ export MOZBUILD_STATE_PATH="$srcdir/mozbuild"
- CFLAGS="${CFLAGS/-O2/-O3} -fno-semantic-interposition"
- CXXFLAGS="${CXXFLAGS/-O2/-O3} -fno-semantic-interposition"
- LDFLAGS+=" -Wl,-Bsymbolic-functions"
-
- cd firefox-$pkgver/obj
-
# Do 3-tier PGO
echo "Building instrumented JS..."
- sh ../js/src/configure "${configure_args[@]}" \
- --enable-profile-generate=cross
- make
+ cat >.mozconfig ../mozconfig - <<END
+ac_add_options --enable-profile-generate=cross
+END
+ ./mach build
echo "Profiling instrumented JS..."
(
- local js="$PWD/dist/bin/js"
+ local js="$PWD/obj/dist/bin/js"
export LLVM_PROFILE_FILE="$PWD/js-%p-%m.profraw"
- cd ../js/src/octane
+ cd js/src/octane
"$js" run.js
cd ../../../third_party/webkit/PerformanceTests/ARES-6
@@ -99,14 +100,15 @@
test -s merged.profdata
echo "Removing instrumented JS..."
- make clobber
+ ./mach clobber
echo "Building optimized JS..."
- sh ../js/src/configure "${configure_args[@]}" \
- --enable-lto=cross \
- --enable-profile-use=cross \
- --with-pgo-profile-path="$PWD/merged.profdata"
- make
+ cat >.mozconfig ../mozconfig - <<END
+ac_add_options --enable-lto=cross
+ac_add_options --enable-profile-use=cross
+ac_add_options --with-pgo-profile-path=${PWD at Q}/merged.profdata
+END
+ ./mach build
}
check() {
More information about the arch-commits
mailing list