From f009d37fe5378c86bcd35e41cb0055637aaf9cb1 Mon Sep 17 00:00:00 2001 From: Giacomo Stevanato Date: Mon, 8 Jul 2024 02:34:21 +0200 Subject: [PATCH] Use rust-lld on windows rustdoc in config_fast_builds.toml (#13553) # Objective - Rustdoc doesn't seem to follow cargo's `linker` setting - Improves the situation in #12207 ## Solution - Explicitly set the linker in rustdoc flags ## Testing - I tested this change on Windows and it significantly improves testing performances (can't give an exact estimate since they got stuck before this change) --- Note: I avoided changing the settings on Linux and MacOS because I can't test on those platforms. It would be nice if someone could test similar changes there and report so they can be done on all major platforms. --- .cargo/config_fast_builds.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/.cargo/config_fast_builds.toml b/.cargo/config_fast_builds.toml index 30824fd13d..7270a7684b 100644 --- a/.cargo/config_fast_builds.toml +++ b/.cargo/config_fast_builds.toml @@ -134,6 +134,7 @@ rustflags = [ # rustup component add llvm-tools # ``` linker = "rust-lld.exe" +rustdocflags = ["-Clinker=rust-lld.exe"] rustflags = [ # Nightly # "-Zshare-generics=n", # This needs to be off if you use dynamic linking on Windows.