PKGBUILD: disable LTO to fix bundled sqlite link errors

Default makepkg.conf has OPTIONS=(... lto ...) which enables LTO globally.
With LTO, the cc crate compiles bundled sqlite3 as LLVM IR objects, and
rust-lld then fails to find any sqlite3_* symbols when linking the final
binary (undefined symbol errors for sqlite3_prepare_v3, sqlite3_finalize,
sqlite3_column_*, etc.).

Adding options=('!lto') tells makepkg to not enable LTO for this package,
which lets the bundled sqlite link normally as machine-code static lib.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
Luna 2026-05-14 08:28:56 -07:00
parent 8b4796b518
commit 17c149c21a

View file

@ -8,6 +8,7 @@ url="https://codeberg.org/anassaeneroi/yt-offline"
license=('AGPL-3.0-only') license=('AGPL-3.0-only')
depends=('yt-dlp' 'mpv' 'sqlite' 'libxcb') depends=('yt-dlp' 'mpv' 'sqlite' 'libxcb')
makedepends=('rust' 'cargo') makedepends=('rust' 'cargo')
options=('!lto') # rusqlite bundled sqlite cannot be LTO-linked with rust-lld
source=("git+https://codeberg.org/anassaeneroi/yt-offline.git") source=("git+https://codeberg.org/anassaeneroi/yt-offline.git")
sha256sums=('SKIP') sha256sums=('SKIP')