Skip to content

Commit 643e7f0

Browse files
committed
./miri build: also build tests, to avoid rebuilds later
1 parent d334a4b commit 643e7f0

File tree

3 files changed

+4
-6
lines changed

3 files changed

+4
-6
lines changed

src/tools/miri/Cargo.lock

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -542,7 +542,6 @@ dependencies = [
542542
"rand",
543543
"regex",
544544
"rustc_version",
545-
"serde",
546545
"smallvec",
547546
"ui_test",
548547
]

src/tools/miri/Cargo.toml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,8 @@ libloading = "0.8"
3939
colored = "2"
4040
ui_test = "0.21.1"
4141
rustc_version = "0.4"
42-
# Features chosen to match those required by env_logger, to avoid rebuilds
43-
regex = { version = "1.5.5", default-features = false, features = ["perf", "std"] }
42+
regex = "1.5.5"
4443
lazy_static = "1.4.0"
45-
# Require a version of serde without intransparent unreproducible binary blobs.
46-
serde = { version = "1.0.185", features = ["derive"] }
4744

4845
[package.metadata.rust-analyzer]
4946
# This crate uses #[feature(rustc_private)].

src/tools/miri/miri-script/src/util.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,9 +111,11 @@ impl MiriEnv {
111111
) -> Result<()> {
112112
let MiriEnv { toolchain, cargo_extra_flags, .. } = self;
113113
let quiet_flag = if quiet { Some("--quiet") } else { None };
114+
// We build the tests as well, (a) to avoid having rebuilds when building the tests later
115+
// and (b) to have more parallelism during the build of Miri and its tests.
114116
let mut cmd = cmd!(
115117
self.sh,
116-
"cargo +{toolchain} build {cargo_extra_flags...} --manifest-path {manifest_path} {quiet_flag...} {args...}"
118+
"cargo +{toolchain} build --bins --tests {cargo_extra_flags...} --manifest-path {manifest_path} {quiet_flag...} {args...}"
117119
);
118120
cmd.set_quiet(quiet);
119121
cmd.run()?;

0 commit comments

Comments
 (0)