@@ -1882,11 +1882,11 @@ pub struct TargetOptions {
18821882 linker_is_gnu_json : bool ,
18831883
18841884 /// Objects to link before and after all other object code.
1885- pub pre_link_objects : CrtObjects ,
1886- pub post_link_objects : CrtObjects ,
1885+ pub pre_link_objects : MaybeLazy < CrtObjects > ,
1886+ pub post_link_objects : MaybeLazy < CrtObjects > ,
18871887 /// Same as `(pre|post)_link_objects`, but when self-contained linking mode is enabled.
1888- pub pre_link_objects_self_contained : CrtObjects ,
1889- pub post_link_objects_self_contained : CrtObjects ,
1888+ pub pre_link_objects_self_contained : MaybeLazy < CrtObjects > ,
1889+ pub post_link_objects_self_contained : MaybeLazy < CrtObjects > ,
18901890 /// Behavior for the self-contained linking mode: inferred for some targets, or explicitly
18911891 /// enabled (in bulk, or with individual components).
18921892 pub link_self_contained : LinkSelfContainedDefault ,
@@ -2366,10 +2366,10 @@ impl Default for TargetOptions {
23662366 static_position_independent_executables : false ,
23672367 plt_by_default : true ,
23682368 relro_level : RelroLevel :: None ,
2369- pre_link_objects : Default :: default ( ) ,
2370- post_link_objects : Default :: default ( ) ,
2371- pre_link_objects_self_contained : Default :: default ( ) ,
2372- post_link_objects_self_contained : Default :: default ( ) ,
2369+ pre_link_objects : MaybeLazy :: lazy ( Default :: default) ,
2370+ post_link_objects : MaybeLazy :: lazy ( Default :: default) ,
2371+ pre_link_objects_self_contained : MaybeLazy :: lazy ( Default :: default) ,
2372+ post_link_objects_self_contained : MaybeLazy :: lazy ( Default :: default) ,
23732373 link_self_contained : LinkSelfContainedDefault :: False ,
23742374 pre_link_args : MaybeLazy :: lazy ( LinkArgs :: new) ,
23752375 pre_link_args_json : LinkArgsCli :: new ( ) ,
@@ -2949,7 +2949,7 @@ impl Target {
29492949
29502950 args. insert( kind, v) ;
29512951 }
2952- base. $key_name = args;
2952+ base. $key_name = MaybeLazy :: owned ( args) ;
29532953 }
29542954 } ) ;
29552955 ( $key_name: ident = $json_name: expr, link_args) => ( {
0 commit comments