Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 530ab61

Browse files
committedMar 21, 2025
Also check for compiler-builtins in linked_symbols
Otherwise the linker complains about EC symbols missing when compiling for arm64ec.
1 parent 63cfd47 commit 530ab61

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed
 

‎compiler/rustc_codegen_ssa/src/back/linker.rs

+3-1
Original file line numberDiff line numberDiff line change
@@ -1824,7 +1824,9 @@ pub(crate) fn linked_symbols(
18241824

18251825
let export_threshold = symbol_export::crates_export_threshold(&[crate_type]);
18261826
for_each_exported_symbols_include_dep(tcx, crate_type, |symbol, info, cnum| {
1827-
if info.level.is_below_threshold(export_threshold) || info.used {
1827+
if info.level.is_below_threshold(export_threshold) && !tcx.is_compiler_builtins(cnum)
1828+
|| info.used
1829+
{
18281830
symbols.push((
18291831
symbol_export::linking_symbol_name_for_instance_in_crate(tcx, symbol, cnum),
18301832
info.kind,

0 commit comments

Comments
 (0)
Failed to load comments.