@@ -748,6 +748,9 @@ pub struct TargetOptions {
748748 /// wasm32 where the whole program either has simd or not.
749749 pub simd_types_indirect : bool ,
750750
751+ /// Pass a list of symbol which should be exported in the dylib to the linker.
752+ pub limit_rdylib_exports : bool ,
753+
751754 /// If set, have the linker export exactly these symbols, instead of using
752755 /// the usual logic to figure this out from the crate itself.
753756 pub override_export_symbols : Option < Vec < String > > ,
@@ -843,6 +846,7 @@ impl Default for TargetOptions {
843846 emit_debug_gdb_scripts : true ,
844847 requires_uwtable : false ,
845848 simd_types_indirect : true ,
849+ limit_rdylib_exports : true ,
846850 override_export_symbols : None ,
847851 merge_functions : MergeFunctions :: Aliases ,
848852 target_mcount : "mcount" . to_string ( ) ,
@@ -1149,6 +1153,7 @@ impl Target {
11491153 key ! ( emit_debug_gdb_scripts, bool ) ;
11501154 key ! ( requires_uwtable, bool ) ;
11511155 key ! ( simd_types_indirect, bool ) ;
1156+ key ! ( limit_rdylib_exports, bool ) ;
11521157 key ! ( override_export_symbols, opt_list) ;
11531158 key ! ( merge_functions, MergeFunctions ) ?;
11541159 key ! ( target_mcount) ;
@@ -1364,6 +1369,7 @@ impl ToJson for Target {
13641369 target_option_val ! ( emit_debug_gdb_scripts) ;
13651370 target_option_val ! ( requires_uwtable) ;
13661371 target_option_val ! ( simd_types_indirect) ;
1372+ target_option_val ! ( limit_rdylib_exports) ;
13671373 target_option_val ! ( override_export_symbols) ;
13681374 target_option_val ! ( merge_functions) ;
13691375 target_option_val ! ( target_mcount) ;
0 commit comments