1
Fork 0

Also check for compiler-builtins in linked_symbols

Otherwise the linker complains about EC symbols missing when compiling
for arm64ec.
This commit is contained in:
bjorn3 2025-03-21 14:06:34 +00:00
parent 63cfd47cb1
commit 530ab61c0e

View file

@ -1824,7 +1824,9 @@ pub(crate) fn linked_symbols(
let export_threshold = symbol_export::crates_export_threshold(&[crate_type]); let export_threshold = symbol_export::crates_export_threshold(&[crate_type]);
for_each_exported_symbols_include_dep(tcx, crate_type, |symbol, info, cnum| { for_each_exported_symbols_include_dep(tcx, crate_type, |symbol, info, cnum| {
if info.level.is_below_threshold(export_threshold) || info.used { if info.level.is_below_threshold(export_threshold) && !tcx.is_compiler_builtins(cnum)
|| info.used
{
symbols.push(( symbols.push((
symbol_export::linking_symbol_name_for_instance_in_crate(tcx, symbol, cnum), symbol_export::linking_symbol_name_for_instance_in_crate(tcx, symbol, cnum),
info.kind, info.kind,