Commit 9cc7adff authored by J0WI's avatar J0WI

main/nodejs: do not overwrite any optimizations

parent b527a311
Pipeline #70329 passed with stages
in 45 minutes and 46 seconds
......@@ -61,7 +61,7 @@ pkgname=nodejs
# Note: Update only to even-numbered versions (e.g. 6.y.z, 8.y.z)!
# Odd-numbered versions are supported only for 9 months by upstream.
pkgver=14.15.4
pkgrel=0
pkgrel=1
pkgdesc="JavaScript runtime built on V8 engine - LTS version"
url="https://nodejs.org/"
arch="all !mips64 !mips64el"
......@@ -97,16 +97,17 @@ build() {
# Add defines recommended in libuv readme.
local common_flags="-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"
# Compiling with O2 instead of Os increases binary size by ~10%
# (53.1 MiB -> 58.6 MiB), but also increases performance by ~20%
# according to v8/web-tooling-benchmark. Node.js is quite huge anyway;
# Os overwrites the optimizations in BUILDTYPE=Release
# increases binary size by ~10% (53.1 MiB -> 58.6 MiB),
# but also increases performance by ~20% according to
# v8/web-tooling-benchmark. Node.js is quite huge anyway;
# there are better options for size constrained environments.
export CFLAGS="${CFLAGS/-Os/-O2} $common_flags"
export CXXFLAGS="${CXXFLAGS/-Os/-O2} $common_flags"
export CPPFLAGS="${CPPFLAGS/-Os/-O2} $common_flags"
export CFLAGS="${CFLAGS/-Os/} $common_flags"
export CXXFLAGS="${CXXFLAGS/-Os/} $common_flags"
export CPPFLAGS="${CPPFLAGS/-Os/} $common_flags"
case "$CARCH" in
mips*) _carchflags="--with-mips-arch-variant=r1 --with-mips-float-abi=soft";;
mips*) _carchflags="--with-mips-arch-variant=r1 --with-mips-float-abi=soft";;
esac
# NOTE: We use bundled libuv because they don't care much about backward
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment