End of rustdoc-js tool add into builder

This commit is contained in:
Guillaume Gomez 2018-01-12 23:40:00 +01:00
parent 50bb6ba13e
commit 69521996c8
4 changed files with 11 additions and 5 deletions

View File

@ -445,7 +445,8 @@ impl<'a> Builder<'a> {
let out_dir = self.stage_out(compiler, mode);
cargo.env("CARGO_TARGET_DIR", out_dir)
.arg(cmd)
.arg("--target").arg(target);
.arg("--target")
.arg(target);
// If we were invoked from `make` then that's already got a jobserver
// set up for us so no need to tell Cargo about jobs all over again.

View File

@ -427,6 +427,7 @@ fn path_for_cargo(builder: &Builder, compiler: Compiler) -> OsString {
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub struct RustdocJS {
pub host: Interned<String>,
pub target: Interned<String>,
}
impl Step for RustdocJS {
@ -435,12 +436,13 @@ impl Step for RustdocJS {
const ONLY_HOSTS: bool = true;
fn should_run(run: ShouldRun) -> ShouldRun {
run.path("src/tests/rustdoc-js")
run.path("src/test/rustdoc-js")
}
fn make_run(run: RunConfig) {
run.builder.ensure(RustdocJS {
host: run.host,
target: run.target,
});
}
@ -448,6 +450,10 @@ impl Step for RustdocJS {
let nodejs = builder.config.nodejs.clone();
let mut command = Command::new(&nodejs.expect("no nodejs found"));
command.args(&["src/tools/rustdoc-js/tester.js", &*self.host]);
builder.ensure(::doc::Std {
target: self.target,
stage: builder.top_stage,
});
builder.run(&mut command);
}
}

View File

@ -418,8 +418,8 @@ impl Step for Standalone {
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub struct Std {
stage: u32,
target: Interned<String>,
pub stage: u32,
pub target: Interned<String>,
}
impl Step for Std {

View File

@ -260,7 +260,6 @@ tool!(
BuildManifest, "src/tools/build-manifest", "build-manifest", Mode::Libstd;
RemoteTestClient, "src/tools/remote-test-client", "remote-test-client", Mode::Libstd;
RustInstaller, "src/tools/rust-installer", "fabricate", Mode::Libstd;
RustdocJS, "rustdoc-js", "js-tests", Mode::Tool;
);
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]