diff options
| author | Mark Simulacrum <mark.simulacrum@gmail.com> | 2018-02-10 18:18:41 -0700 |
|---|---|---|
| committer | Mark Simulacrum <mark.simulacrum@gmail.com> | 2018-02-10 18:18:41 -0700 |
| commit | 55c36e37443e6fa4252157d4bc47b49b3d6e201d (patch) | |
| tree | 5b1679332343d7b59c3eb21ffaad7d0ed167081f /src/bootstrap | |
| parent | 11580b7be3a830ccea569b64545ec77008c452ac (diff) | |
| download | rust-55c36e37443e6fa4252157d4bc47b49b3d6e201d.tar.gz rust-55c36e37443e6fa4252157d4bc47b49b3d6e201d.zip | |
Remove DontDistWithMiri struct and instead just directly check it in builder
Diffstat (limited to 'src/bootstrap')
| -rw-r--r-- | src/bootstrap/builder.rs | 9 | ||||
| -rw-r--r-- | src/bootstrap/dist.rs | 25 |
2 files changed, 7 insertions, 27 deletions
diff --git a/src/bootstrap/builder.rs b/src/bootstrap/builder.rs index b65c20e398e..32cc1d7223d 100644 --- a/src/bootstrap/builder.rs +++ b/src/bootstrap/builder.rs @@ -286,8 +286,7 @@ impl<'a> Builder<'a> { doc::Reference, doc::Rustdoc, doc::RustByExample, doc::CargoBook), Kind::Dist => describe!(dist::Docs, dist::Mingw, dist::Rustc, dist::DebuggerScripts, dist::Std, dist::Analysis, dist::Src, dist::PlainSourceTarball, dist::Cargo, - dist::Rls, dist::Rustfmt, dist::Extended, dist::HashSign, - dist::DontDistWithMiriEnabled), + dist::Rls, dist::Rustfmt, dist::Extended, dist::HashSign), Kind::Install => describe!(install::Docs, install::Std, install::Cargo, install::Rls, install::Rustfmt, install::Analysis, install::Src, install::Rustc), } @@ -344,6 +343,12 @@ impl<'a> Builder<'a> { stack: RefCell::new(Vec::new()), }; + if kind == Kind::Dist { + assert!(!build.config.test_miri, "Do not distribute with miri enabled.\n\ + The distributed libraries would include all MIR (increasing binary size). + The distributed MIR would include validation statements."); + } + StepDescription::run(&Builder::get_step_descriptions(builder.kind), &builder, paths); } diff --git a/src/bootstrap/dist.rs b/src/bootstrap/dist.rs index 460fb016f16..e7aed7eb4fe 100644 --- a/src/bootstrap/dist.rs +++ b/src/bootstrap/dist.rs @@ -1233,31 +1233,6 @@ impl Step for Rustfmt { } } - -#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] -pub struct DontDistWithMiriEnabled; - -impl Step for DontDistWithMiriEnabled { - type Output = PathBuf; - const DEFAULT: bool = true; - - fn should_run(run: ShouldRun) -> ShouldRun { - let build_miri = run.builder.build.config.test_miri; - run.default_condition(build_miri) - } - - fn make_run(run: RunConfig) { - run.builder.ensure(DontDistWithMiriEnabled); - } - - fn run(self, _: &Builder) -> PathBuf { - panic!("Do not distribute with miri enabled.\n\ - The distributed libraries would include all MIR (increasing binary size). - The distributed MIR would include validation statements."); - } -} - - #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] pub struct Extended { stage: u32, |
