diff --git a/.cargo/config.toml b/.cargo/config.toml index 66222af5..d5a01393 100644 --- a/.cargo/config.toml +++ b/.cargo/config.toml @@ -3,6 +3,10 @@ # resolve (ring_core_* symbols). Fix: force cc as linker driver and append # -fuse-ld=bfd so it overrides the hardcoded -fuse-ld=lld (last flag wins). # bfd is always available via binutils (part of base-devel on Arch). +# +# NOTE: When building via makepkg (AUR), RUSTFLAGS from /etc/makepkg.conf +# overrides target-specific rustflags here. The PKGBUILD's build() applies +# the same fix by patching the RUSTFLAGS env var directly. [target.x86_64-unknown-linux-gnu] linker = "cc" rustflags = ["-C", "link-arg=-fuse-ld=bfd"] diff --git a/packages/aur/PKGBUILD b/packages/aur/PKGBUILD index 89b67b6b..24c13eb5 100644 --- a/packages/aur/PKGBUILD +++ b/packages/aur/PKGBUILD @@ -27,6 +27,12 @@ build() { export CARGO_HOME="$srcdir/cargo-home" export npm_config_cache="$srcdir/npm-cache" + # ring (used by tauri-plugin-updater → rustls) ships C/asm objects whose + # symbols (ring_core_*) lld cannot resolve. Arch's makepkg.conf bakes + # -fuse-ld=lld into RUSTFLAGS which overrides .cargo/config.toml. + # Swap lld → bfd (binutils, part of base-devel) so the link succeeds. + export RUSTFLAGS="${RUSTFLAGS//-fuse-ld=lld/-fuse-ld=bfd}" + npm install npm run tauri:build -- --no-bundle }