Generate symbols.o for proc-macros too

To ensure used statics are functioning correctly for proc-macros too.
This commit is contained in:
bjorn3
2025-06-17 20:31:16 +00:00
parent ae2fc9722f
commit 2bb98e2c48
4 changed files with 32 additions and 2 deletions

View File

@@ -1817,8 +1817,13 @@ pub(crate) fn linked_symbols(
crate_type: CrateType,
) -> Vec<(String, SymbolExportKind)> {
match crate_type {
CrateType::Executable | CrateType::Cdylib | CrateType::Dylib | CrateType::Sdylib => (),
CrateType::Staticlib | CrateType::ProcMacro | CrateType::Rlib => {
CrateType::Executable
| CrateType::ProcMacro
| CrateType::Cdylib
| CrateType::Dylib
| CrateType::Sdylib => (),
CrateType::Staticlib | CrateType::Rlib => {
// These are not linked, so no need to generate symbols.o for them.
return Vec::new();
}
}