fix(aur): append -fuse-ld=bfd to RUSTFLAGS — substitution was no-op on CachyOS

This commit is contained in:
Psychotoxical
2026-04-02 11:54:50 +02:00
parent 74c75d83ca
commit f9bc67cb77
+5 -4
View File
@@ -28,10 +28,11 @@ build() {
export npm_config_cache="$srcdir/npm-cache" export npm_config_cache="$srcdir/npm-cache"
# ring (used by tauri-plugin-updater → rustls) ships C/asm objects whose # ring (used by tauri-plugin-updater → rustls) ships C/asm objects whose
# symbols (ring_core_*) lld cannot resolve. Arch's makepkg.conf bakes # symbols (ring_core_*) lld cannot resolve. On Arch/CachyOS, -fuse-ld=lld
# -fuse-ld=lld into RUSTFLAGS which overrides .cargo/config.toml. # is hardcoded into rustc itself (not just makepkg.conf RUSTFLAGS), so a
# Swap lld → bfd (binutils, part of base-devel) so the link succeeds. # string substitution is a no-op. Appending -C link-arg=-fuse-ld=bfd works
export RUSTFLAGS="${RUSTFLAGS//-fuse-ld=lld/-fuse-ld=bfd}" # because the last -fuse-ld=* flag passed to cc wins.
export RUSTFLAGS="${RUSTFLAGS} -C link-arg=-fuse-ld=bfd"
npm install npm install
npm run tauri:build -- --no-bundle npm run tauri:build -- --no-bundle