@@ -287,6 +287,7 @@ pub struct Config {
287
287
pub rust_profile_generate : Option < String > ,
288
288
pub rust_lto : RustcLto ,
289
289
pub rust_validate_mir_opts : Option < u32 > ,
290
+ pub rust_std_features : Option < Vec < String > > ,
290
291
pub llvm_profile_use : Option < String > ,
291
292
pub llvm_profile_generate : bool ,
292
293
pub llvm_libunwind_default : Option < LlvmLibunwind > ,
@@ -1141,6 +1142,7 @@ define_config! {
1141
1142
download_rustc: Option <StringOrBool > = "download-rustc" ,
1142
1143
lto: Option <String > = "lto" ,
1143
1144
validate_mir_opts: Option <u32 > = "validate-mir-opts" ,
1145
+ std_features: Option <Vec <String >> = "std_features"
1144
1146
}
1145
1147
}
1146
1148
@@ -1621,6 +1623,7 @@ impl Config {
1621
1623
let mut optimize = None ;
1622
1624
let mut omit_git_hash = None ;
1623
1625
let mut lld_enabled = None ;
1626
+ let mut std_features = None ;
1624
1627
1625
1628
let mut is_user_configured_rust_channel = false ;
1626
1629
@@ -1679,6 +1682,7 @@ impl Config {
1679
1682
stack_protector,
1680
1683
strip,
1681
1684
lld_mode,
1685
+ std_features : std_features_toml,
1682
1686
} = rust;
1683
1687
1684
1688
is_user_configured_rust_channel = channel. is_some ( ) ;
@@ -1698,6 +1702,7 @@ impl Config {
1698
1702
debuginfo_level_tools = debuginfo_level_tools_toml;
1699
1703
debuginfo_level_tests = debuginfo_level_tests_toml;
1700
1704
lld_enabled = lld_enabled_toml;
1705
+ std_features = std_features_toml;
1701
1706
1702
1707
optimize = optimize_toml;
1703
1708
omit_git_hash = omit_git_hash_toml;
@@ -2103,6 +2108,9 @@ impl Config {
2103
2108
) ;
2104
2109
}
2105
2110
2111
+ // std_features chosen during bootstrap
2112
+ config. rust_std_features = std_features. unwrap_or_default ( ) ;
2113
+
2106
2114
let default = debug == Some ( true ) ;
2107
2115
config. rust_debug_assertions = debug_assertions. unwrap_or ( default) ;
2108
2116
config. rust_debug_assertions_std =
@@ -2949,6 +2957,7 @@ fn check_incompatible_options_for_ci_rustc(
2949
2957
download_rustc : _,
2950
2958
validate_mir_opts : _,
2951
2959
frame_pointers : _,
2960
+ std_features : _,
2952
2961
} = ci_rust_config;
2953
2962
2954
2963
// There are two kinds of checks for CI rustc incompatible options:
0 commit comments