From aea9a3c3ec679867feb9c6d2dfc96b9bb735f5a6 Mon Sep 17 00:00:00 2001 From: bjorn3 <17426603+bjorn3@users.noreply.github.com> Date: Sat, 2 Dec 2023 14:18:30 +0000 Subject: [PATCH] Add temporary back compat hack for rust-for-linux --- compiler/rustc_symbol_mangling/src/v0.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/compiler/rustc_symbol_mangling/src/v0.rs b/compiler/rustc_symbol_mangling/src/v0.rs index 73ddeb5012f5..348805b01265 100644 --- a/compiler/rustc_symbol_mangling/src/v0.rs +++ b/compiler/rustc_symbol_mangling/src/v0.rs @@ -69,6 +69,12 @@ pub(super) fn mangle<'tcx>( } pub fn mangle_internal_symbol<'tcx>(tcx: TyCtxt<'tcx>, item_name: &str) -> String { + if item_name == "__rust_no_alloc_shim_is_unstable" { + // Temporary back compat hack to give people the chance to migrate to + // include #[rustc_std_internal_symbol]. + return "__rust_no_alloc_shim_is_unstable".to_owned(); + } + let prefix = "_R"; let mut cx: SymbolMangler<'_> = SymbolMangler { tcx,