Change __rust_no_alloc_shim_is_unstable to be a function

This commit is contained in:
Daniel Paoliello
2025-05-15 16:38:46 -07:00
parent d9ca9bd014
commit 6906b44e1c
18 changed files with 155 additions and 131 deletions

View File

@@ -219,6 +219,7 @@ fn exported_symbols_provider_local<'tcx>(
.chain([
mangle_internal_symbol(tcx, "__rust_alloc_error_handler"),
mangle_internal_symbol(tcx, OomStrategy::SYMBOL),
mangle_internal_symbol(tcx, NO_ALLOC_SHIM_IS_UNSTABLE),
])
{
let exported_symbol = ExportedSymbol::NoDefId(SymbolName::new(tcx, &symbol_name));
@@ -232,19 +233,6 @@ fn exported_symbols_provider_local<'tcx>(
},
));
}
let exported_symbol = ExportedSymbol::NoDefId(SymbolName::new(
tcx,
&mangle_internal_symbol(tcx, NO_ALLOC_SHIM_IS_UNSTABLE),
));
symbols.push((
exported_symbol,
SymbolExportInfo {
level: SymbolExportLevel::Rust,
kind: SymbolExportKind::Data,
used: false,
},
))
}
if tcx.sess.instrument_coverage() || tcx.sess.opts.cg.profile_generate.enabled() {