about summary refs log tree commit diff
diff options
context:
space:
mode:
authorbjorn3 <17426603+bjorn3@users.noreply.github.com>2025-03-21 14:06:34 +0000
committerbjorn3 <17426603+bjorn3@users.noreply.github.com>2025-03-21 14:06:34 +0000
commit530ab61c0eca891773bb71716849e3e934e84e9f (patch)
treecf965660d71337118640e25a313d55a5b7a9381e
parent63cfd47cb10940e593f6755a54c12438f7fced8f (diff)
downloadrust-530ab61c0eca891773bb71716849e3e934e84e9f.tar.gz
rust-530ab61c0eca891773bb71716849e3e934e84e9f.zip
Also check for compiler-builtins in linked_symbols
Otherwise the linker complains about EC symbols missing when compiling
for arm64ec.
-rw-r--r--compiler/rustc_codegen_ssa/src/back/linker.rs4
1 files changed, 3 insertions, 1 deletions
diff --git a/compiler/rustc_codegen_ssa/src/back/linker.rs b/compiler/rustc_codegen_ssa/src/back/linker.rs
index 7df2d128d2f..3f5e0c1bce9 100644
--- a/compiler/rustc_codegen_ssa/src/back/linker.rs
+++ b/compiler/rustc_codegen_ssa/src/back/linker.rs
@@ -1824,7 +1824,9 @@ pub(crate) fn linked_symbols(
 
     let export_threshold = symbol_export::crates_export_threshold(&[crate_type]);
     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((
                 symbol_export::linking_symbol_name_for_instance_in_crate(tcx, symbol, cnum),
                 info.kind,