nginx-current: enable lto

This commit is contained in:
psykose 2022-06-24 01:54:10 +00:00
parent 94763b8828
commit c210ca7518
Signed by: psykose
SSH key fingerprint: SHA256:HwlGVJNLZqHoOvMtkshyGaXLkcdbEJahYMlepHFL+Uk

View file

@ -1,7 +1,7 @@
# Maintainer: psykose <alice@ayaya.dev>
pkgname=nginx-current
pkgver=1.23.0
pkgrel=0
pkgrel=1
pkgdesc="HTTP and reverse proxy server (current version)"
url="https://www.nginx.org/"
arch="all"
@ -9,10 +9,12 @@ license="BSD-2-Clause"
depends="!nginx"
makedepends="
brotli-dev
clang
file-dev
gd-dev
libxml2-dev
libxslt-dev
lld
linux-headers
openssl3-dev
pcre2-dev
@ -37,6 +39,11 @@ source="https://nginx.org/download/nginx-$pkgver.tar.gz
builddir="$srcdir/nginx-$pkgver"
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"
# Built-in dynamic modules
@ -95,7 +102,7 @@ build() {
--group=$_grp_ngx \
--with-threads \
--with-file-aio \
--with-ld-opt="-lmagic" \
--with-ld-opt="-lmagic $LDFLAGS" \
\
--with-http_ssl_module \
--with-http_v2_module \