File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -60,6 +60,14 @@ impl ExportedSymbols {
6060 local_crate. push ( ( "main" . to_string ( ) , SymbolExportLevel :: C ) ) ;
6161 }
6262
63+ if let Some ( id) = scx. sess ( ) . derive_registrar_fn . get ( ) {
64+ let svh = & scx. link_meta ( ) . crate_hash ;
65+ let def_id = scx. tcx ( ) . map . local_def_id ( id) ;
66+ let idx = def_id. index ;
67+ let registrar = scx. sess ( ) . generate_derive_registrar_symbol ( svh, idx) ;
68+ local_crate. push ( ( registrar, SymbolExportLevel :: C ) ) ;
69+ }
70+
6371 if scx. sess ( ) . crate_types . borrow ( ) . contains ( & config:: CrateTypeDylib ) {
6472 local_crate. push ( ( scx. metadata_symbol_name ( ) ,
6573 SymbolExportLevel :: Rust ) ) ;
@@ -135,8 +143,8 @@ pub fn crate_export_threshold(crate_type: config::CrateType)
135143 match crate_type {
136144 config:: CrateTypeExecutable |
137145 config:: CrateTypeStaticlib |
138- config:: CrateTypeCdylib => SymbolExportLevel :: C ,
139146 config:: CrateTypeProcMacro |
147+ config:: CrateTypeCdylib => SymbolExportLevel :: C ,
140148 config:: CrateTypeRlib |
141149 config:: CrateTypeMetadata |
142150 config:: CrateTypeDylib => SymbolExportLevel :: Rust ,
You can’t perform that action at this time.
0 commit comments