From 75928bd9a4fe7214b1d116ff955c4fd784b67a55 Mon Sep 17 00:00:00 2001 From: dianqk Date: Thu, 2 Nov 2023 23:13:12 +0800 Subject: [PATCH] Try~ --- compiler/rustc_codegen_ssa/src/back/link.rs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/compiler/rustc_codegen_ssa/src/back/link.rs b/compiler/rustc_codegen_ssa/src/back/link.rs index f55d50a42d7f..a19c8b997207 100644 --- a/compiler/rustc_codegen_ssa/src/back/link.rs +++ b/compiler/rustc_codegen_ssa/src/back/link.rs @@ -270,7 +270,12 @@ pub fn each_linked_rlib( for &cnum in crates { match fmts.get(cnum.as_usize() - 1) { - Some(&Linkage::NotLinked | &Linkage::Dynamic | &Linkage::IncludedFromDylib) => continue, + Some(&Linkage::NotLinked | &Linkage::Dynamic) => continue, + Some(&Linkage::IncludedFromDylib) => { + if info.compiler_builtins != Some(cnum) { + continue; + } + } Some(_) => {} None => return Err(errors::LinkRlibError::MissingFormat), }