@@ -1968,11 +1968,11 @@ pub struct TargetOptions {
19681968 linker_is_gnu_json : bool ,
19691969
19701970 /// Objects to link before and after all other object code.
1971- pub pre_link_objects : CrtObjects ,
1972- pub post_link_objects : CrtObjects ,
1971+ pub pre_link_objects : MaybeLazy < CrtObjects > ,
1972+ pub post_link_objects : MaybeLazy < CrtObjects > ,
19731973 /// Same as `(pre|post)_link_objects`, but when self-contained linking mode is enabled.
1974- pub pre_link_objects_self_contained : CrtObjects ,
1975- pub post_link_objects_self_contained : CrtObjects ,
1974+ pub pre_link_objects_self_contained : MaybeLazy < CrtObjects > ,
1975+ pub post_link_objects_self_contained : MaybeLazy < CrtObjects > ,
19761976 /// Behavior for the self-contained linking mode: inferred for some targets, or explicitly
19771977 /// enabled (in bulk, or with individual components).
19781978 pub link_self_contained : LinkSelfContainedDefault ,
@@ -2452,10 +2452,10 @@ impl Default for TargetOptions {
24522452 static_position_independent_executables : false ,
24532453 plt_by_default : true ,
24542454 relro_level : RelroLevel :: None ,
2455- pre_link_objects : Default :: default ( ) ,
2456- post_link_objects : Default :: default ( ) ,
2457- pre_link_objects_self_contained : Default :: default ( ) ,
2458- post_link_objects_self_contained : Default :: default ( ) ,
2455+ pre_link_objects : MaybeLazy :: lazy ( Default :: default) ,
2456+ post_link_objects : MaybeLazy :: lazy ( Default :: default) ,
2457+ pre_link_objects_self_contained : MaybeLazy :: lazy ( Default :: default) ,
2458+ post_link_objects_self_contained : MaybeLazy :: lazy ( Default :: default) ,
24592459 link_self_contained : LinkSelfContainedDefault :: False ,
24602460 pre_link_args : MaybeLazy :: lazy ( LinkArgs :: new) ,
24612461 pre_link_args_json : LinkArgsCli :: new ( ) ,
@@ -3046,7 +3046,7 @@ impl Target {
30463046
30473047 args. insert( kind, v) ;
30483048 }
3049- base. $key_name = args;
3049+ base. $key_name = MaybeLazy :: owned ( args) ;
30503050 }
30513051 } ) ;
30523052 ( $key_name: ident = $json_name: expr, link_args) => ( {
0 commit comments