From 7a344836a28b5beafdc2c5de02f6dcdfef1ca641 Mon Sep 17 00:00:00 2001 From: Thomas Eizinger Date: Mon, 23 Jun 2025 17:55:36 +0200 Subject: [PATCH] fix(rust): use `rust-lld` linker for MSVC (#9641) The latest VisualStudio version shipped a bug in the MSVC linker that cannot handle symbols above a certain size. Switching to the Rust linker fixes this issue. Related: https://github.com/rust-lang/rust/issues/141626 --- rust/.cargo/config.toml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/rust/.cargo/config.toml b/rust/.cargo/config.toml index c6e0da270..d2bbe90d5 100644 --- a/rust/.cargo/config.toml +++ b/rust/.cargo/config.toml @@ -3,3 +3,8 @@ rustflags="-C force-frame-pointers=yes" [target.x86_64-unknown-linux-gnu] rustflags="-C force-frame-pointers=yes" + +# https://github.com/rust-lang/rust/issues/141626 +# (can be removed once link.exe is fixed) +[target.x86_64-pc-windows-msvc] +linker = "rust-lld"