@@ -855,6 +855,8 @@ pub struct TargetOptions {
855855 /// the functions in the executable are not randomized and can be used
856856 /// during an exploit of a vulnerability in any code.
857857 pub position_independent_executables : bool ,
858+ /// Executables that are both statically linked and position-independent are supported.
859+ pub static_position_independent_executables : bool ,
858860 /// Determines if the target always requires using the PLT for indirect
859861 /// library calls or not. This controls the default value of the `-Z plt` flag.
860862 pub needs_plt : bool ,
@@ -1028,6 +1030,7 @@ impl Default for TargetOptions {
10281030 has_rpath : false ,
10291031 no_default_libraries : true ,
10301032 position_independent_executables : false ,
1033+ static_position_independent_executables : false ,
10311034 needs_plt : false ,
10321035 relro_level : RelroLevel :: None ,
10331036 pre_link_objects : Default :: default ( ) ,
@@ -1432,6 +1435,7 @@ impl Target {
14321435 key ! ( has_rpath, bool ) ;
14331436 key ! ( no_default_libraries, bool ) ;
14341437 key ! ( position_independent_executables, bool ) ;
1438+ key ! ( static_position_independent_executables, bool ) ;
14351439 key ! ( needs_plt, bool ) ;
14361440 key ! ( relro_level, RelroLevel ) ?;
14371441 key ! ( archive_format) ;
@@ -1663,6 +1667,7 @@ impl ToJson for Target {
16631667 target_option_val ! ( has_rpath) ;
16641668 target_option_val ! ( no_default_libraries) ;
16651669 target_option_val ! ( position_independent_executables) ;
1670+ target_option_val ! ( static_position_independent_executables) ;
16661671 target_option_val ! ( needs_plt) ;
16671672 target_option_val ! ( relro_level) ;
16681673 target_option_val ! ( archive_format) ;
0 commit comments