summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorhjmjaa2024-07-02 10:17:07 +0200
committerhjmjaa2024-07-02 10:18:15 +0200
commitfc545a4cd250cbb5a973fdf855d9c1b7bd1fd5c7 (patch)
tree9527f445a1c86ef109c0be22812df6f55704ac1a /PKGBUILD
parent3b96fc4e2b6633b0cdd329d9d171d391e753be19 (diff)
downloadaur-fc545a4cd250cbb5a973fdf855d9c1b7bd1fd5c7.tar.gz
Add optimized build
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD11
1 files changed, 9 insertions, 2 deletions
diff --git a/PKGBUILD b/PKGBUILD
index ab97f673a026..75fbc70dfc81 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -2,7 +2,7 @@
_pkgname=wait_ex
pkgname="$_pkgname-git"
-pkgver=0.1.0.r2.g330d3cb
+pkgver=0.1.0.r3.g1557ace
pkgrel=1
pkgdesc="Replacement of Bash's wait with error handling"
arch=('x86_64')
@@ -30,7 +30,14 @@ pkgver() {
build() {
cd "$_pkgname"
- nimble -d:release build
+ # The options ensure private and total memory usage is as low as
+ # possible. Private usage is 340 kB. Resident set size is 1.0 MB.
+ # Private usage is calculated using following (with wait_ex running):
+ # `ps -eo size,command | sort -n -k 1,1 | cut -c1-80 | grep wait_ex`
+ # `-d:useMalloc` ensures that Nim doesn't preallocate a big heap, thus
+ # reducing private usage by about 500 kB.
+ nimble -o:wait_ex -d:danger --opt:size --threads:off --mm:arc \
+ --passC:-flto --passL:-flto -d:useMalloc build
}
package() {