@@ -287,6 +287,7 @@ pub struct Config {
287287 pub rust_profile_generate : Option < String > ,
288288 pub rust_lto : RustcLto ,
289289 pub rust_validate_mir_opts : Option < u32 > ,
290+ pub rust_std_features : Option < Vec < String > > ,
290291 pub llvm_profile_use : Option < String > ,
291292 pub llvm_profile_generate : bool ,
292293 pub llvm_libunwind_default : Option < LlvmLibunwind > ,
@@ -1141,6 +1142,7 @@ define_config! {
11411142 download_rustc: Option <StringOrBool > = "download-rustc" ,
11421143 lto: Option <String > = "lto" ,
11431144 validate_mir_opts: Option <u32 > = "validate-mir-opts" ,
1145+ std_features: Option <Vec <String >> = "std_features" ,
11441146 }
11451147}
11461148
@@ -1621,6 +1623,7 @@ impl Config {
16211623 let mut optimize = None ;
16221624 let mut omit_git_hash = None ;
16231625 let mut lld_enabled = None ;
1626+ let mut std_features = None ;
16241627
16251628 let mut is_user_configured_rust_channel = false ;
16261629
@@ -1679,6 +1682,7 @@ impl Config {
16791682 stack_protector,
16801683 strip,
16811684 lld_mode,
1685+ std_features : std_features_toml,
16821686 } = rust;
16831687
16841688 is_user_configured_rust_channel = channel. is_some ( ) ;
@@ -1698,6 +1702,7 @@ impl Config {
16981702 debuginfo_level_tools = debuginfo_level_tools_toml;
16991703 debuginfo_level_tests = debuginfo_level_tests_toml;
17001704 lld_enabled = lld_enabled_toml;
1705+ std_features = std_features_toml;
17011706
17021707 optimize = optimize_toml;
17031708 omit_git_hash = omit_git_hash_toml;
@@ -2103,6 +2108,9 @@ impl Config {
21032108 ) ;
21042109 }
21052110
2111+ // std_features chosen during bootstrap
2112+ config. rust_std_features = std_features;
2113+
21062114 let default = debug == Some ( true ) ;
21072115 config. rust_debug_assertions = debug_assertions. unwrap_or ( default) ;
21082116 config. rust_debug_assertions_std =
@@ -2949,6 +2957,7 @@ fn check_incompatible_options_for_ci_rustc(
29492957 download_rustc : _,
29502958 validate_mir_opts : _,
29512959 frame_pointers : _,
2960+ std_features : _,
29522961 } = ci_rust_config;
29532962
29542963 // There are two kinds of checks for CI rustc incompatible options:
0 commit comments