diff --git a/aur/owlry/PKGBUILD b/aur/owlry/PKGBUILD index f038858..7975556 100644 --- a/aur/owlry/PKGBUILD +++ b/aur/owlry/PKGBUILD @@ -86,6 +86,15 @@ build() { cd "owlry" export RUSTUP_TOOLCHAIN=stable export CARGO_TARGET_DIR=target + # Force GNU ld.bfd. Arch's `extra/rust` defaults rustc to `-fuse-ld=lld`, + # and LLD's single-pass arg processing can't satisfy `-llua5.4` because + # mlua-sys+lua-src emit the `-l` flag before their `-L $OUT_DIR/lib` + # search path in the final link line (cargo:rustc-link-lib emitted + # before cargo:rustc-link-search). BFD does multi-pass and finds the + # archive regardless. RUSTFLAGS env-var beats any cargo config rustflags, + # which is necessary here because Arch's rust pkg appears to set its own + # RUSTFLAGS that we need to fully override. + export RUSTFLAGS="-C link-arg=-fuse-ld=bfd" # 'full' enables every optional provider — the AUR binary is the # batteries-included experience. cargo install consumers can still opt # to --no-default-features and pick their own subset. @@ -96,6 +105,7 @@ check() { cd "owlry" export RUSTUP_TOOLCHAIN=stable export CARGO_TARGET_DIR=target + export RUSTFLAGS="-C link-arg=-fuse-ld=bfd" cargo test --frozen --release --features full }