diff options
| author | Jana Dönszelmann <jana@donsz.nl> | 2025-08-25 18:52:57 +0200 |
|---|---|---|
| committer | Jana Dönszelmann <jana@donsz.nl> | 2025-08-26 13:05:51 +0200 |
| commit | d66ca530000af040a6f0a53c48e3ee35ae96f86b (patch) | |
| tree | 2b82cae0fffdf5b2242974055db4a5803a1d9f63 /compiler/rustc_codegen_ssa/src/codegen_attrs.rs | |
| parent | b779120cad2c93e53c0dfb7007c1214b2b275183 (diff) | |
| download | rust-d66ca530000af040a6f0a53c48e3ee35ae96f86b.tar.gz rust-d66ca530000af040a6f0a53c48e3ee35ae96f86b.zip | |
add a flag to codegen fn attrs for foreign items
Diffstat (limited to 'compiler/rustc_codegen_ssa/src/codegen_attrs.rs')
| -rw-r--r-- | compiler/rustc_codegen_ssa/src/codegen_attrs.rs | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/compiler/rustc_codegen_ssa/src/codegen_attrs.rs b/compiler/rustc_codegen_ssa/src/codegen_attrs.rs index 6b0bd64102c..961bb788149 100644 --- a/compiler/rustc_codegen_ssa/src/codegen_attrs.rs +++ b/compiler/rustc_codegen_ssa/src/codegen_attrs.rs @@ -385,6 +385,8 @@ fn apply_overrides(tcx: TyCtxt<'_>, did: LocalDefId, codegen_fn_attrs: &mut Code // Foreign items by default use no mangling for their symbol name. if tcx.is_foreign_item(did) { + codegen_fn_attrs.flags |= CodegenFnAttrFlags::FOREIGN_ITEM; + // There's a few exceptions to this rule though: if codegen_fn_attrs.flags.contains(CodegenFnAttrFlags::RUSTC_STD_INTERNAL_SYMBOL) { // * `#[rustc_std_internal_symbol]` mangles the symbol name in a special way |
