@@ -1981,11 +1981,11 @@ pub struct TargetOptions {
19811981 linker_is_gnu_json : bool ,
19821982
19831983 /// Objects to link before and after all other object code.
1984- pub pre_link_objects : CrtObjects ,
1985- pub post_link_objects : CrtObjects ,
1984+ pub pre_link_objects : MaybeLazy < CrtObjects > ,
1985+ pub post_link_objects : MaybeLazy < CrtObjects > ,
19861986 /// Same as `(pre|post)_link_objects`, but when self-contained linking mode is enabled.
1987- pub pre_link_objects_self_contained : CrtObjects ,
1988- pub post_link_objects_self_contained : CrtObjects ,
1987+ pub pre_link_objects_self_contained : MaybeLazy < CrtObjects > ,
1988+ pub post_link_objects_self_contained : MaybeLazy < CrtObjects > ,
19891989 /// Behavior for the self-contained linking mode: inferred for some targets, or explicitly
19901990 /// enabled (in bulk, or with individual components).
19911991 pub link_self_contained : LinkSelfContainedDefault ,
@@ -2465,10 +2465,10 @@ impl Default for TargetOptions {
24652465 static_position_independent_executables : false ,
24662466 plt_by_default : true ,
24672467 relro_level : RelroLevel :: None ,
2468- pre_link_objects : Default :: default ( ) ,
2469- post_link_objects : Default :: default ( ) ,
2470- pre_link_objects_self_contained : Default :: default ( ) ,
2471- post_link_objects_self_contained : Default :: default ( ) ,
2468+ pre_link_objects : MaybeLazy :: lazy ( Default :: default) ,
2469+ post_link_objects : MaybeLazy :: lazy ( Default :: default) ,
2470+ pre_link_objects_self_contained : MaybeLazy :: lazy ( Default :: default) ,
2471+ post_link_objects_self_contained : MaybeLazy :: lazy ( Default :: default) ,
24722472 link_self_contained : LinkSelfContainedDefault :: False ,
24732473 pre_link_args : MaybeLazy :: lazy ( LinkArgs :: new) ,
24742474 pre_link_args_json : LinkArgsCli :: new ( ) ,
@@ -3059,7 +3059,7 @@ impl Target {
30593059
30603060 args. insert( kind, v) ;
30613061 }
3062- base. $key_name = args;
3062+ base. $key_name = MaybeLazy :: owned ( args) ;
30633063 }
30643064 } ) ;
30653065 ( $key_name: ident = $json_name: expr, link_args) => ( {
0 commit comments