Skip to content

Commit 0a736eb

Browse files
committed
fix: make std_features CI rustc incompatible
1 parent 16264f8 commit 0a736eb

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

src/bootstrap/src/core/build_steps/compile.rs

+1-3
Original file line numberDiff line numberDiff line change
@@ -553,9 +553,7 @@ pub fn std_cargo(builder: &Builder<'_>, target: TargetSelection, stage: u32, car
553553
.arg("--features")
554554
.arg(features);
555555
} else {
556-
let builder_std_features = format!(" {}", &builder.std_features(target));
557-
558-
features += &builder_std_features;
556+
features += &builder.std_features(target);
559557
features.push_str(compiler_builtins_c_feature);
560558

561559
cargo

src/bootstrap/src/core/config/config.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -2998,6 +2998,7 @@ fn check_incompatible_options_for_ci_rustc(
29982998
description,
29992999
incremental,
30003000
default_linker,
3001+
std_features,
30013002

30023003
// Rest of the options can simply be ignored.
30033004
debug: _,
@@ -3037,7 +3038,6 @@ fn check_incompatible_options_for_ci_rustc(
30373038
download_rustc: _,
30383039
validate_mir_opts: _,
30393040
frame_pointers: _,
3040-
std_features: _,
30413041
} = ci_rust_config;
30423042

30433043
// There are two kinds of checks for CI rustc incompatible options:
@@ -3060,6 +3060,7 @@ fn check_incompatible_options_for_ci_rustc(
30603060
err!(current_rust_config.default_linker, default_linker);
30613061
err!(current_rust_config.stack_protector, stack_protector);
30623062
err!(current_rust_config.lto, lto);
3063+
err!(current_rust_config.std_features, std_features);
30633064

30643065
warn!(current_rust_config.channel, channel);
30653066
warn!(current_rust_config.description, description);

src/bootstrap/src/lib.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -661,7 +661,8 @@ impl Build {
661661
&self.config.rust_info
662662
}
663663

664-
/// Gets the space-separated set of activated features for the standard ibrary. This can be configured with the `std-features` key in config.toml.
664+
/// Gets the space-separated set of activated features for the standard library.
665+
/// This can be configured with the `std-features` key in config.toml.
665666
fn std_features(&self, target: TargetSelection) -> String {
666667
let mut features: BTreeSet<&str> =
667668
self.config.rust_std_features.iter().map(|s| s.as_str()).collect();

0 commit comments

Comments
 (0)