Disable LTO in PKGBUILD to fix vendored Lua static link
Some checks failed
Mirror to GitHub / mirror (push) Successful in 11s
Build and publish package / package (push) Failing after 3m25s

makepkg's default -flto=auto made mlua's vendored liblua5.4.a contain GCC
LTO bitcode that the Rust (lld) link couldn't read, leaving all lua_*
symbols undefined. options=(!lto) produces a clean static link.
Verified building in a clean archlinux container.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Breadway 2026-06-13 16:52:54 +08:00
parent 746e03a5a8
commit 01a95ecbbf

View file

@ -7,6 +7,10 @@ pkgdesc="A reactive automation fabric for Linux desktops"
arch=('x86_64')
url="https://github.com/Breadway/bread"
license=('MIT')
# mlua builds Lua from vendored C source. makepkg's default -flto=auto would
# emit GCC LTO bitcode into liblua5.4.a, which the Rust (lld) link can't read,
# leaving all lua_* symbols undefined. Disable LTO for a clean static link.
options=(!lto)
depends=('glibc' 'libgit2')
optdepends=(
'libnotify: desktop notifications via bread.notify()'