about summary refs log tree commit diff
path: root/compiler/rustc_codegen_ssa/src/back
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2022-10-20 16:20:50 +0000
committerbors <bors@rust-lang.org>2022-10-20 16:20:50 +0000
commit5ffa67d7309047ff47b9c624ba4061fb8c004c31 (patch)
tree27dcce6c0db7c6a67c13d0ffce15aa9a67d8025b /compiler/rustc_codegen_ssa/src/back
parent542febd2d383b5082277c7d165b098c0a3b513f6 (diff)
parentacf51e13457c45b97cdfd551d85d3e75140e0ff7 (diff)
downloadrust-5ffa67d7309047ff47b9c624ba4061fb8c004c31.tar.gz
rust-5ffa67d7309047ff47b9c624ba4061fb8c004c31.zip
Auto merge of #103092 - petrochenkov:weaklto, r=wesleywiser
linker: Fix weak lang item linking with combination windows-gnu + LLD + LTO

In https://github.com/rust-lang/rust/pull/100404 this logic was originally disabled for MSVC due to issues with LTO, but the same issues appear on windows-gnu with LLD because that LLD uses the same underlying logic as MSVC LLD, just with re-syntaxed command line options.

So this PR just disables it for LTO builds in general.
Diffstat (limited to 'compiler/rustc_codegen_ssa/src/back')
-rw-r--r--compiler/rustc_codegen_ssa/src/back/link.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_codegen_ssa/src/back/link.rs b/compiler/rustc_codegen_ssa/src/back/link.rs
index 751007c7eb3..88b584c3086 100644
--- a/compiler/rustc_codegen_ssa/src/back/link.rs
+++ b/compiler/rustc_codegen_ssa/src/back/link.rs
@@ -2715,7 +2715,7 @@ fn relevant_lib(sess: &Session, lib: &NativeLib) -> bool {
     }
 }
 
-fn are_upstream_rust_objects_already_included(sess: &Session) -> bool {
+pub(crate) fn are_upstream_rust_objects_already_included(sess: &Session) -> bool {
     match sess.lto() {
         config::Lto::Fat => true,
         config::Lto::Thin => {