From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: "Jan Alexander Steffens (heftig)" <heftig@archlinux.org>
Date: Fri, 19 Sep 2025 17:11:42 +0200
Subject: [PATCH] compiler: Use ld.lld by default

Change the default linker flavor to use LLD. This avoids the self-
contained rust-lld, which can only be built when also building LLVM.

See: https://gitlab.archlinux.org/archlinux/packaging/packages/rust/-/issues/8
---
 compiler/rustc_target/src/spec/mod.rs | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/compiler/rustc_target/src/spec/mod.rs b/compiler/rustc_target/src/spec/mod.rs
index d6a9e27c4655..2065f9de53c2 100644
--- a/compiler/rustc_target/src/spec/mod.rs
+++ b/compiler/rustc_target/src/spec/mod.rs
@@ -2832,7 +2832,7 @@ fn default() -> TargetOptions {
             cfg_abi: CfgAbi::Unspecified,
             vendor: "unknown".into(),
             linker: option_env!("CFG_DEFAULT_LINKER").map(|s| s.into()),
-            linker_flavor: LinkerFlavor::Gnu(Cc::Yes, Lld::No),
+            linker_flavor: LinkerFlavor::Gnu(Cc::Yes, Lld::Yes),
             linker_flavor_json: LinkerFlavorCli::Gcc,
             lld_flavor_json: LldFlavor::Ld,
             linker_is_gnu_json: true,
