Export scalar statics in wasm
This commit is contained in:
parent
4f074dea1d
commit
eb4fc2d4fe
1 changed files with 6 additions and 1 deletions
|
|
@ -349,7 +349,12 @@ fn symbol_export_level(tcx: TyCtxt<'_>, sym_def_id: DefId) -> SymbolExportLevel
|
|||
if let Some(Node::Item(&hir::Item { kind: hir::ItemKind::Static(..), .. })) =
|
||||
tcx.hir().get_if_local(sym_def_id)
|
||||
{
|
||||
return SymbolExportLevel::Rust;
|
||||
let export_level = if tcx.type_of(sym_def_id).is_scalar() {
|
||||
SymbolExportLevel::C
|
||||
} else {
|
||||
SymbolExportLevel::Rust
|
||||
};
|
||||
return export_level;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue