@@ -1882,11 +1882,11 @@ pub struct TargetOptions {
1882
1882
linker_is_gnu_json : bool ,
1883
1883
1884
1884
/// 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 > ,
1887
1887
/// 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 > ,
1890
1890
/// Behavior for the self-contained linking mode: inferred for some targets, or explicitly
1891
1891
/// enabled (in bulk, or with individual components).
1892
1892
pub link_self_contained : LinkSelfContainedDefault ,
@@ -2366,10 +2366,10 @@ impl Default for TargetOptions {
2366
2366
static_position_independent_executables : false ,
2367
2367
plt_by_default : true ,
2368
2368
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) ,
2373
2373
link_self_contained : LinkSelfContainedDefault :: False ,
2374
2374
pre_link_args : MaybeLazy :: lazy ( LinkArgs :: new) ,
2375
2375
pre_link_args_json : LinkArgsCli :: new ( ) ,
@@ -2949,7 +2949,7 @@ impl Target {
2949
2949
2950
2950
args. insert( kind, v) ;
2951
2951
}
2952
- base. $key_name = args;
2952
+ base. $key_name = MaybeLazy :: owned ( args) ;
2953
2953
}
2954
2954
} ) ;
2955
2955
( $key_name: ident = $json_name: expr, link_args) => ( {
0 commit comments