strata, flea: compile the test harness in parallel

Both upstreams set fat LTO in their release profile (strata also
codegen-units = 1), which compiles the final crate on one thread. That
is a reasonable trade for the binary users run, and build() keeps it.
check() then compiled the same crate a second time under the same
profile for the test harness, and threw it away. On the aarch64 builds,
which run under QEMU, those two serial compiles were 106 of strata's
118 minutes.

check() now builds the harness with thin LTO and 16 codegen units in
its own target directory. The shipped binary is unchanged. Measured on
the x86_64 builder for strata's test binary: 708 s serial, 223 s with
this profile. Local run: shipped strata still 7m30s from target/, tests
3m43s from target-check/, 1998 passed.

ttfx has the same upstream profile but no check(), so nothing to do.
This commit is contained in:
Ryan Hughes committed 2026-09-21 02:23:36 -04:00
1 parent cb8aae545e
commit ec81434684
2 files changed
+19 -4

No files matched your search

+8 -2
View File
@@ -2,7 +2,7 @@
pkgname=flea
pkgver=0.3.1
pkgrel=1
pkgrel=2
pkgdesc='Fast, keyboard-first file manager for Omarchy'
arch=('x86_64' 'aarch64')
url='https://github.com/thisisgm/flea'
@@ -64,7 +64,13 @@ build() {
check() {
cd "$pkgname-$pkgver"
export CARGO_TARGET_DIR=target
# Upstream's release profile uses fat LTO, whose final link runs on one
# thread. build() keeps it for the shipped binary; the test harness is a
# throwaway second compile, so build it in parallel in its own target
# directory.
export CARGO_TARGET_DIR=target-check
export CARGO_PROFILE_RELEASE_LTO=thin
export CARGO_PROFILE_RELEASE_CODEGEN_UNITS=16
local -a test_args=()
if ! /usr/bin/prlimit --cpu=30 --as=1073741824 \