Remove implicit #[no_mangle] for #[rustc_std_internal_symbol]
This commit is contained in:
@@ -28,6 +28,7 @@ use rustc_middle::ty::{self, Instance, Ty, TyCtxt};
|
||||
use rustc_session::Session;
|
||||
use rustc_session::config::{self, CrateType, EntryFnType, OutputType};
|
||||
use rustc_span::{DUMMY_SP, Symbol, sym};
|
||||
use rustc_symbol_mangling::mangle_internal_symbol;
|
||||
use rustc_trait_selection::infer::{BoundRegionConversionTime, TyCtxtInferExt};
|
||||
use rustc_trait_selection::traits::{ObligationCause, ObligationCtxt};
|
||||
use tracing::{debug, info};
|
||||
@@ -989,7 +990,12 @@ impl CrateInfo {
|
||||
.for_each(|(_, linked_symbols)| {
|
||||
let mut symbols = missing_weak_lang_items
|
||||
.iter()
|
||||
.map(|item| (format!("{prefix}{item}"), SymbolExportKind::Text))
|
||||
.map(|item| {
|
||||
(
|
||||
format!("{prefix}{}", mangle_internal_symbol(tcx, item.as_str())),
|
||||
SymbolExportKind::Text,
|
||||
)
|
||||
})
|
||||
.collect::<Vec<_>>();
|
||||
symbols.sort_unstable_by(|a, b| a.0.cmp(&b.0));
|
||||
linked_symbols.extend(symbols);
|
||||
@@ -1002,7 +1008,13 @@ impl CrateInfo {
|
||||
// errors.
|
||||
linked_symbols.extend(ALLOCATOR_METHODS.iter().map(|method| {
|
||||
(
|
||||
format!("{prefix}{}", global_fn_name(method.name).as_str()),
|
||||
format!(
|
||||
"{prefix}{}",
|
||||
mangle_internal_symbol(
|
||||
tcx,
|
||||
global_fn_name(method.name).as_str()
|
||||
)
|
||||
),
|
||||
SymbolExportKind::Text,
|
||||
)
|
||||
}));
|
||||
|
||||
Reference in New Issue
Block a user