Skip to content

Commit 4cf5fc3

Browse files
authored
Removes redundant LLD configuration for x86_64-unknown-linux-gnu (#21157)
## Objective Fixes #21121 Recent Rust versions use LLD by default for `x86_64-unknown-linux-gnu`, so our config is redundant. ## Solution Removes the LLD-specific configuration for Linux: - `linker = "clang"` - LLD installation instructions - LLD flags in `rustdocflags` Also updated the docs to reflect this change and clarified that the Mold instructions about disabling LLD are now Windows-only. ## Testing Builds successfully without the removed configuration.
1 parent 9de4cd4 commit 4cf5fc3

File tree

1 file changed

+5
-17
lines changed

1 file changed

+5
-17
lines changed

.cargo/config_fast_builds.toml

Lines changed: 5 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,9 @@
88
# ## LLD
99
#
1010
# LLD is a linker from the LLVM project that supports Linux, Windows, macOS, and Wasm. It has the greatest
11-
# platform support and the easiest installation process. It is enabled by default in this file for Linux
12-
# and Windows. On macOS, the default linker yields higher performance than LLD and is used instead.
11+
# platform support and the easiest installation process. It is enabled by default in this file for Windows.
12+
# LLD is the default linker in Rust itself for Linux, so no configuration is needed.
13+
# On macOS, the default linker yields higher performance than LLD and is used instead.
1314
#
1415
# To install, please scroll to the corresponding table for your target (eg. `[target.x86_64-pc-windows-msvc]`
1516
# for Windows) and follow the steps under `LLD linker`.
@@ -22,8 +23,8 @@
2223
# through its high parallelism, though it only supports Linux.
2324
#
2425
# Mold is disabled by default in this file. If you wish to enable it, follow the installation instructions for
25-
# your corresponding target, disable LLD by commenting out its `-Clink-arg=...` line, and enable Mold by
26-
# *uncommenting* its `-Clink-arg=...` line.
26+
# your corresponding target, disable LLD by commenting out its `-Clink-arg=...` line (not applicable for Linux anymore),
27+
# and enable Mold by *uncommenting* its `-Clink-arg=...` line.
2728
#
2829
# There is a fork of Mold named Sold that supports macOS, but it is unmaintained and is about the same speed as
2930
# the default ld64 linker. For this reason, it is not included in this file.
@@ -65,17 +66,7 @@
6566
# For more information, see the blog post at <https://blog.rust-lang.org/2023/11/09/parallel-rustc.html>.
6667

6768
[target.x86_64-unknown-linux-gnu]
68-
linker = "clang"
6969
rustflags = [
70-
# LLD linker
71-
#
72-
# You may need to install it:
73-
#
74-
# - Ubuntu: `sudo apt-get install lld clang`
75-
# - Fedora: `sudo dnf install lld clang`
76-
# - Arch: `sudo pacman -S lld clang`
77-
"-Clink-arg=-fuse-ld=lld",
78-
7970
# Mold linker
8071
#
8172
# You may need to install it:
@@ -92,9 +83,6 @@ rustflags = [
9283
# Some systems may experience linker performance issues when running doc tests.
9384
# See https://github.com/bevyengine/bevy/issues/12207 for details.
9485
rustdocflags = [
95-
# LLD linker
96-
"-Clink-arg=-fuse-ld=lld",
97-
9886
# Mold linker
9987
# "-Clink-arg=-fuse-ld=mold",
10088
]

0 commit comments

Comments
 (0)