nginx-current: enable lto
This commit is contained in:
parent
94763b8828
commit
c210ca7518
1 changed files with 9 additions and 2 deletions
|
@ -1,7 +1,7 @@
|
||||||
# Maintainer: psykose <alice@ayaya.dev>
|
# Maintainer: psykose <alice@ayaya.dev>
|
||||||
pkgname=nginx-current
|
pkgname=nginx-current
|
||||||
pkgver=1.23.0
|
pkgver=1.23.0
|
||||||
pkgrel=0
|
pkgrel=1
|
||||||
pkgdesc="HTTP and reverse proxy server (current version)"
|
pkgdesc="HTTP and reverse proxy server (current version)"
|
||||||
url="https://www.nginx.org/"
|
url="https://www.nginx.org/"
|
||||||
arch="all"
|
arch="all"
|
||||||
|
@ -9,10 +9,12 @@ license="BSD-2-Clause"
|
||||||
depends="!nginx"
|
depends="!nginx"
|
||||||
makedepends="
|
makedepends="
|
||||||
brotli-dev
|
brotli-dev
|
||||||
|
clang
|
||||||
file-dev
|
file-dev
|
||||||
gd-dev
|
gd-dev
|
||||||
libxml2-dev
|
libxml2-dev
|
||||||
libxslt-dev
|
libxslt-dev
|
||||||
|
lld
|
||||||
linux-headers
|
linux-headers
|
||||||
openssl3-dev
|
openssl3-dev
|
||||||
pcre2-dev
|
pcre2-dev
|
||||||
|
@ -37,6 +39,11 @@ source="https://nginx.org/download/nginx-$pkgver.tar.gz
|
||||||
builddir="$srcdir/nginx-$pkgver"
|
builddir="$srcdir/nginx-$pkgver"
|
||||||
options="!check" # no time!
|
options="!check" # no time!
|
||||||
|
|
||||||
|
export CC=clang
|
||||||
|
export CFLAGS="$CFLAGS -flto"
|
||||||
|
# passed below
|
||||||
|
export LDFLAGS="$LDFLAGS -flto -fuse-ld=lld -Wl,--icf=all"
|
||||||
|
|
||||||
_modules_dir="usr/lib/nginx/modules"
|
_modules_dir="usr/lib/nginx/modules"
|
||||||
|
|
||||||
# Built-in dynamic modules
|
# Built-in dynamic modules
|
||||||
|
@ -95,7 +102,7 @@ build() {
|
||||||
--group=$_grp_ngx \
|
--group=$_grp_ngx \
|
||||||
--with-threads \
|
--with-threads \
|
||||||
--with-file-aio \
|
--with-file-aio \
|
||||||
--with-ld-opt="-lmagic" \
|
--with-ld-opt="-lmagic $LDFLAGS" \
|
||||||
\
|
\
|
||||||
--with-http_ssl_module \
|
--with-http_ssl_module \
|
||||||
--with-http_v2_module \
|
--with-http_v2_module \
|
||||||
|
|
Reference in a new issue