diff --git a/PKGBUILD b/PKGBUILD index 40f2798..5ece8ec 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -13,7 +13,7 @@ url="https://git.cbsk-tech.de/Christoph/GitLite" license=('MIT') depends=('webkit2gtk-4.1' 'gtk3' 'git' 'hicolor-icon-theme' 'libappindicator-gtk3' 'librsvg' 'xdotool') makedepends=('rust' 'nodejs' 'npm') -options=('!lto') +options=('!lto' '!debug') source=() sha256sums=() @@ -26,6 +26,16 @@ pkgver() { build() { cd "$startdir" + + # mistralrs-core is large enough that the regular release profile (thin LTO, + # one codegen unit and Arch debug flags) can exhaust memory in the LXC build + # runner. Keep the package optimized while bounding peak compiler memory. + export CARGO_BUILD_JOBS=1 + export CARGO_PROFILE_RELEASE_OPT_LEVEL=2 + export CARGO_PROFILE_RELEASE_LTO=false + export CARGO_PROFILE_RELEASE_CODEGEN_UNITS=8 + export CARGO_PROFILE_RELEASE_DEBUG=0 + npm ci # Build through the Tauri CLI (not a raw `cargo build --release`): it enables # the `custom-protocol` cargo feature that makes the binary load the embedded