Skip to content
Snippets Groups Projects
Commit 3ebb13e4 authored by Jakub Jirutka's avatar Jakub Jirutka :flag_ua:
Browse files

testing/sad: build with -Os instead of -Oz, use CARGO_PROFILE_* vars

parent 58532801
No related branches found
No related tags found
No related merge requests found
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
# Maintainer: Jakub Jirutka <jakub@jirutka.cz> # Maintainer: Jakub Jirutka <jakub@jirutka.cz>
pkgname=sad pkgname=sad
pkgver=0.4.20 pkgver=0.4.20
pkgrel=0 pkgrel=1
pkgdesc="CLI search and replace - a batch file edit tool" pkgdesc="CLI search and replace - a batch file edit tool"
url="https://github.com/ms-jpq/sad" url="https://github.com/ms-jpq/sad"
arch="aarch64 armhf armv7 ppc64le x86 x86_64" # limited by rust/cargo arch="aarch64 armhf armv7 ppc64le x86 x86_64" # limited by rust/cargo
...@@ -10,19 +10,14 @@ license="MIT" ...@@ -10,19 +10,14 @@ license="MIT"
makedepends="cargo" makedepends="cargo"
source="https://github.com/ms-jpq/sad/archive/v$pkgver/sad-$pkgver.tar.gz" source="https://github.com/ms-jpq/sad/archive/v$pkgver/sad-$pkgver.tar.gz"
export CARGO_PROFILE_RELEASE_CODEGEN_UNITS=1
export CARGO_PROFILE_RELEASE_LTO="true"
export CARGO_PROFILE_RELEASE_OPT_LEVEL="s"
export CARGO_PROFILE_RELEASE_PANIC="abort"
prepare() { prepare() {
default_prepare default_prepare
# Reduce binary size.
cat >> Cargo.toml <<-EOF
[profile.release]
codegen-units = 1
lto = true
opt-level = "z"
panic = "abort"
EOF
cargo fetch --locked cargo fetch --locked
} }
...@@ -35,8 +30,7 @@ check() { ...@@ -35,8 +30,7 @@ check() {
} }
package() { package() {
cargo install --locked --offline --path . --root="$pkgdir/usr" install -D -m755 target/release/sad -t "$pkgdir"/usr/bin/
rm "$pkgdir"/usr/.crates*
} }
sha512sums=" sha512sums="
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment