George Rawlinson pushed to branch main at Arch Linux / Packaging / Packages / 
git-delta


Commits:
8ec82361 by DeepChirp at 2026-06-07T11:11:00+08:00
Enable LTO for Rust

- - - - -


1 changed file:

- PKGBUILD


Changes:

=====================================
PKGBUILD
=====================================
@@ -40,6 +40,11 @@ build() {
 
   export RUSTONIG_DYNAMIC_LIBONIG=1
 
+  # https://github.com/dandavison/delta/issues/2122
+  # TODO: Once the upstream adds LTO optimization to `Cargo.toml`, the 
environment variable below can be removed
+  export CARGO_PROFILE_RELEASE_LTO="true"
+  export CARGO_PROFILE_RELEASE_CODEGEN_UNITS=1
+
   # binary
   cargo build --frozen --release --all-features
 
@@ -51,6 +56,10 @@ build() {
 
 check() {
   cd "$pkgname"
+
+  export CARGO_PROFILE_RELEASE_LTO="true"
+  export CARGO_PROFILE_RELEASE_CODEGEN_UNITS=1
+
   # some tests hang for 60+ seconds, find out why
   # took my machine ~ 470 seconds
   cargo test --frozen --all-features



View it on GitLab: 
https://gitlab.archlinux.org/archlinux/packaging/packages/git-delta/-/commit/8ec82361036e42e0ab547ef8831f3464cdd348b0

-- 
View it on GitLab: 
https://gitlab.archlinux.org/archlinux/packaging/packages/git-delta/-/commit/8ec82361036e42e0ab547ef8831f3464cdd348b0
You're receiving this email because of your account on gitlab.archlinux.org. 
Manage all notifications: https://gitlab.archlinux.org/-/profile/notifications 
| Help: https://gitlab.archlinux.org/help


Reply via email to