gentoo-ebuilds/dev-lang/rust/files/rust-1.87.0-issue-139372-bgo-953956-fix-hardcoded-gnu-linker-flags.patch
Joonas Niilola dc7aaf972c
dev-lang/rust: fix building '+wasm' on clang/lld system on 1.87.0
- sync changes from 1.86.0.

Bug: https://bugs.gentoo.org/953956
Signed-off-by: Joonas Niilola <juippis@gentoo.org>
2025-06-16 08:32:59 +03:00

29 lines
1.4 KiB
Diff

From 76e13020767e7ff783284b5bcf7a7509259ceb51 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jakub=20Ber=C3=A1nek?= <berykubik@gmail.com>
Date: Fri, 4 Apr 2025 18:29:20 +0200
Subject: [PATCH] Use target-agnostic LLD flags in bootstrap for use-lld
---
src/bootstrap/src/utils/helpers.rs | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/bootstrap/src/utils/helpers.rs b/src/bootstrap/src/utils/helpers.rs
index f8e4d4e04717d..78dcdcbd1874a 100644
--- a/src/bootstrap/src/utils/helpers.rs
+++ b/src/bootstrap/src/utils/helpers.rs
@@ -474,13 +474,13 @@ pub fn linker_flags(
if stage == 0 && target.is_windows() {
args.push("-Clink-arg=-fuse-ld=lld".to_string());
} else {
- args.push("-Clinker-flavor=gnu-lld-cc".to_string());
+ args.push("-Zlinker-features=+lld".to_string());
}
// FIXME(kobzol): remove this flag once MCP510 gets stabilized
args.push("-Zunstable-options".to_string());
}
LldMode::SelfContained => {
- args.push("-Clinker-flavor=gnu-lld-cc".to_string());
+ args.push("-Zlinker-features=+lld".to_string());
args.push("-Clink-self-contained=+linker".to_string());
// FIXME(kobzol): remove this flag once MCP510 gets stabilized
args.push("-Zunstable-options".to_string());