@@ -423,19 +423,23 @@ pub struct TargetOptions {
423
423
/// Linker arguments that are passed *before* any user-defined libraries.
424
424
pub pre_link_args : LinkArgs , // ... unconditionally
425
425
pub pre_link_args_crt : LinkArgs , // ... when linking with a bundled crt
426
- /// Objects to link before all others, always found within the
426
+ /// Objects to link before all others, all except *_sys found within the
427
427
/// sysroot folder.
428
428
pub pre_link_objects_exe : Vec < String > , // ... when linking an executable, unconditionally
429
429
pub pre_link_objects_exe_crt : Vec < String > , // ... when linking an executable with a bundled crt
430
+ pub pre_link_objects_exe_crt_sys : Vec < String > , // ... when linking an executable with a bundled
431
+ // crt, from the system library search path
430
432
pub pre_link_objects_dll : Vec < String > , // ... when linking a dylib
431
433
/// Linker arguments that are unconditionally passed after any
432
434
/// user-defined but before post_link_objects. Standard platform
433
435
/// libraries that should be always be linked to, usually go here.
434
436
pub late_link_args : LinkArgs ,
435
- /// Objects to link after all others, always found within the
437
+ /// Objects to link after all others, all except *_sys found within the
436
438
/// sysroot folder.
437
439
pub post_link_objects : Vec < String > , // ... unconditionally
438
440
pub post_link_objects_crt : Vec < String > , // ... when linking with a bundled crt
441
+ pub post_link_objects_crt_sys : Vec < String > , // ... when linking with a bundled crt, from the
442
+ // system library search path
439
443
/// Linker arguments that are unconditionally passed *after* any
440
444
/// user-defined libraries.
441
445
pub post_link_args : LinkArgs ,
@@ -670,9 +674,11 @@ impl Default for TargetOptions {
670
674
relro_level : RelroLevel :: None ,
671
675
pre_link_objects_exe : Vec :: new ( ) ,
672
676
pre_link_objects_exe_crt : Vec :: new ( ) ,
677
+ pre_link_objects_exe_crt_sys : Vec :: new ( ) ,
673
678
pre_link_objects_dll : Vec :: new ( ) ,
674
679
post_link_objects : Vec :: new ( ) ,
675
680
post_link_objects_crt : Vec :: new ( ) ,
681
+ post_link_objects_crt_sys : Vec :: new ( ) ,
676
682
late_link_args : LinkArgs :: new ( ) ,
677
683
link_env : Vec :: new ( ) ,
678
684
archive_format : "gnu" . to_string ( ) ,
@@ -894,10 +900,12 @@ impl Target {
894
900
key ! ( pre_link_args_crt, link_args) ;
895
901
key ! ( pre_link_objects_exe, list) ;
896
902
key ! ( pre_link_objects_exe_crt, list) ;
903
+ key ! ( pre_link_objects_exe_crt_sys, list) ;
897
904
key ! ( pre_link_objects_dll, list) ;
898
905
key ! ( late_link_args, link_args) ;
899
906
key ! ( post_link_objects, list) ;
900
907
key ! ( post_link_objects_crt, list) ;
908
+ key ! ( post_link_objects_crt_sys, list) ;
901
909
key ! ( post_link_args, link_args) ;
902
910
key ! ( link_env, env) ;
903
911
key ! ( asm_args, list) ;
@@ -1102,10 +1110,12 @@ impl ToJson for Target {
1102
1110
target_option_val ! ( link_args - pre_link_args_crt) ;
1103
1111
target_option_val ! ( pre_link_objects_exe) ;
1104
1112
target_option_val ! ( pre_link_objects_exe_crt) ;
1113
+ target_option_val ! ( pre_link_objects_exe_crt_sys) ;
1105
1114
target_option_val ! ( pre_link_objects_dll) ;
1106
1115
target_option_val ! ( link_args - late_link_args) ;
1107
1116
target_option_val ! ( post_link_objects) ;
1108
1117
target_option_val ! ( post_link_objects_crt) ;
1118
+ target_option_val ! ( post_link_objects_crt_sys) ;
1109
1119
target_option_val ! ( link_args - post_link_args) ;
1110
1120
target_option_val ! ( env - link_env) ;
1111
1121
target_option_val ! ( asm_args) ;
0 commit comments