Skip to content

Commit 1a8f030

Browse files
authored
Unrolled build for #149550
Rollup merge of #149550 - bjorn3:faster_compile_time_deps, r=RalfJung Disable native-lib for x check miri This reduces check times for miri from 2m15s to 20s. And reduces check times for miri with --compile-time-deps from 1m50s to 7s. This makes rust-analyzer start a lot faster after switching branches. r? ```@RalfJung```
2 parents 556beb9 + b3bf315 commit 1a8f030

File tree

1 file changed

+19
-2
lines changed
  • src/bootstrap/src/core/build_steps

1 file changed

+19
-2
lines changed

src/bootstrap/src/core/build_steps/check.rs

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -662,6 +662,7 @@ macro_rules! tool_check_step {
662662
$(, allow_features: $allow_features:expr )?
663663
// Features that should be enabled when checking
664664
$(, enable_features: [$($enable_features:expr),*] )?
665+
$(, default_features: $default_features:expr )?
665666
$(, default: $default:literal )?
666667
$( , )?
667668
}
@@ -708,8 +709,13 @@ macro_rules! tool_check_step {
708709
_value
709710
};
710711
let extra_features: &[&str] = &[$($($enable_features),*)?];
712+
let default_features = {
713+
let mut _value = true;
714+
$( _value = $default_features; )?
715+
_value
716+
};
711717
let mode: Mode = $mode;
712-
run_tool_check_step(builder, compiler, target, $path, mode, allow_features, extra_features);
718+
run_tool_check_step(builder, compiler, target, $path, mode, allow_features, extra_features, default_features);
713719
}
714720

715721
fn metadata(&self) -> Option<StepMetadata> {
@@ -720,6 +726,7 @@ macro_rules! tool_check_step {
720726
}
721727

722728
/// Used by the implementation of `Step::run` in `tool_check_step!`.
729+
#[allow(clippy::too_many_arguments)]
723730
fn run_tool_check_step(
724731
builder: &Builder<'_>,
725732
compiler: CompilerForCheck,
@@ -728,6 +735,7 @@ fn run_tool_check_step(
728735
mode: Mode,
729736
allow_features: &str,
730737
extra_features: &[&str],
738+
default_features: bool,
731739
) {
732740
let display_name = path.rsplit('/').next().unwrap();
733741

@@ -761,6 +769,10 @@ fn run_tool_check_step(
761769
cargo.arg("--all-targets");
762770
}
763771

772+
if !default_features {
773+
cargo.arg("--no-default-features");
774+
}
775+
764776
let stamp = BuildStamp::new(&builder.cargo_out(build_compiler, mode, target))
765777
.with_prefix(&format!("{display_name}-check"));
766778

@@ -778,7 +790,12 @@ tool_check_step!(Rustdoc {
778790
// behavior, treat it as in-tree so that any new warnings in clippy will be
779791
// rejected.
780792
tool_check_step!(Clippy { path: "src/tools/clippy", mode: Mode::ToolRustcPrivate });
781-
tool_check_step!(Miri { path: "src/tools/miri", mode: Mode::ToolRustcPrivate });
793+
tool_check_step!(Miri {
794+
path: "src/tools/miri",
795+
mode: Mode::ToolRustcPrivate,
796+
enable_features: ["stack-cache"],
797+
default_features: false,
798+
});
782799
tool_check_step!(CargoMiri { path: "src/tools/miri/cargo-miri", mode: Mode::ToolRustcPrivate });
783800
tool_check_step!(Rustfmt { path: "src/tools/rustfmt", mode: Mode::ToolRustcPrivate });
784801
tool_check_step!(RustAnalyzer {

0 commit comments

Comments
 (0)