diff options
| author | bjorn3 <17426603+bjorn3@users.noreply.github.com> | 2025-05-08 14:34:40 +0000 |
|---|---|---|
| committer | bjorn3 <17426603+bjorn3@users.noreply.github.com> | 2025-06-24 19:44:33 +0000 |
| commit | 0cdd7f50b06fb363a2e8b0f6d270e0ed14476af8 (patch) | |
| tree | 0c5474c3ae8636f5f310a8b6dc704c7fd0c5d01e /compiler/rustc_middle | |
| parent | 3129d37ef7075ee3cbaa3d6cbe1b5794f67192b0 (diff) | |
Add all rustc_std_internal_symbol to symbols.o
rustc_std_internal_symbol is meant to call functions from crates where there is no direct dependency on said crate. As they either have to be added to symbols.o or rustc has to introduce an implicit dependency on them to avoid linker errors. The latter is done for some things like the panic runtime, but adding these symbols to symbols.o allows removing those implicit dependencies.
Diffstat (limited to 'compiler/rustc_middle')
| -rw-r--r-- | compiler/rustc_middle/src/middle/exported_symbols.rs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/compiler/rustc_middle/src/middle/exported_symbols.rs b/compiler/rustc_middle/src/middle/exported_symbols.rs index 64a1f2aff15..491bba98c19 100644 --- a/compiler/rustc_middle/src/middle/exported_symbols.rs +++ b/compiler/rustc_middle/src/middle/exported_symbols.rs @@ -35,7 +35,10 @@ pub enum SymbolExportKind { pub struct SymbolExportInfo { pub level: SymbolExportLevel, pub kind: SymbolExportKind, + /// Was the symbol marked as `#[used(compiler)]` or `#[used(linker)]`? pub used: bool, + /// Was the symbol marked as `#[rustc_std_internal_symbol]`? + pub rustc_std_internal_symbol: bool, } #[derive(Eq, PartialEq, Debug, Copy, Clone, TyEncodable, TyDecodable, HashStable)] |
