Skip to content

Commit

Permalink
Rollup merge of #81517 - tmiasko:san-crates, r=Mark-Simulacrum
Browse files Browse the repository at this point in the history
Remove remnants of the santizer runtime crates from bootstrap
  • Loading branch information
jackh726 authored Feb 2, 2021
2 parents 399c0a8 + 99eeb13 commit 71792d8
Showing 1 changed file with 1 addition and 50 deletions.
51 changes: 1 addition & 50 deletions src/bootstrap/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ use std::process::Command;
use build_helper::{self, output, t};

use crate::builder::{Builder, Compiler, Kind, RunConfig, ShouldRun, Step};
use crate::cache::{Interned, INTERNER};
use crate::cache::Interned;
use crate::compile;
use crate::config::TargetSelection;
use crate::dist;
Expand Down Expand Up @@ -1613,55 +1613,6 @@ impl Step for CrateLibrustc {
}
}

#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
pub struct CrateNotDefault {
compiler: Compiler,
target: TargetSelection,
test_kind: TestKind,
krate: &'static str,
}

impl Step for CrateNotDefault {
type Output = ();

fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> {
run.path("src/librustc_asan")
.path("src/librustc_lsan")
.path("src/librustc_msan")
.path("src/librustc_tsan")
}

fn make_run(run: RunConfig<'_>) {
let builder = run.builder;
let compiler = builder.compiler(builder.top_stage, run.build_triple());

let test_kind = builder.kind.into();

builder.ensure(CrateNotDefault {
compiler,
target: run.target,
test_kind,
krate: match run.path {
_ if run.path.ends_with("src/librustc_asan") => "rustc_asan",
_ if run.path.ends_with("src/librustc_lsan") => "rustc_lsan",
_ if run.path.ends_with("src/librustc_msan") => "rustc_msan",
_ if run.path.ends_with("src/librustc_tsan") => "rustc_tsan",
_ => panic!("unexpected path {:?}", run.path),
},
});
}

fn run(self, builder: &Builder<'_>) {
builder.ensure(Crate {
compiler: self.compiler,
target: self.target,
mode: Mode::Std,
test_kind: self.test_kind,
krate: INTERNER.intern_str(self.krate),
});
}
}

#[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
pub struct Crate {
pub compiler: Compiler,
Expand Down

0 comments on commit 71792d8

Please sign in to comment.