@@ -1981,11 +1981,11 @@ pub struct TargetOptions {
1981
1981
linker_is_gnu_json : bool ,
1982
1982
1983
1983
/// 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 > ,
1986
1986
/// 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 > ,
1989
1989
/// Behavior for the self-contained linking mode: inferred for some targets, or explicitly
1990
1990
/// enabled (in bulk, or with individual components).
1991
1991
pub link_self_contained : LinkSelfContainedDefault ,
@@ -2465,10 +2465,10 @@ impl Default for TargetOptions {
2465
2465
static_position_independent_executables : false ,
2466
2466
plt_by_default : true ,
2467
2467
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) ,
2472
2472
link_self_contained : LinkSelfContainedDefault :: False ,
2473
2473
pre_link_args : MaybeLazy :: lazy ( LinkArgs :: new) ,
2474
2474
pre_link_args_json : LinkArgsCli :: new ( ) ,
@@ -3059,7 +3059,7 @@ impl Target {
3059
3059
3060
3060
args. insert( kind, v) ;
3061
3061
}
3062
- base. $key_name = args;
3062
+ base. $key_name = MaybeLazy :: owned ( args) ;
3063
3063
}
3064
3064
} ) ;
3065
3065
( $key_name: ident = $json_name: expr, link_args) => ( {
0 commit comments