Skip to content

Commit

Permalink
End of rustdoc-js tool add into builder
Browse files Browse the repository at this point in the history
  • Loading branch information
GuillaumeGomez committed Jan 12, 2018
1 parent 50bb6ba commit 6952199
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 5 deletions.
3 changes: 2 additions & 1 deletion src/bootstrap/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
8 changes: 7 additions & 1 deletion src/bootstrap/check.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -435,19 +436,24 @@ 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,
});
}

fn run(self, builder: &Builder) {
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);
}
}
Expand Down
4 changes: 2 additions & 2 deletions src/bootstrap/doc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
1 change: 0 additions & 1 deletion src/bootstrap/tool.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)]
Expand Down

0 comments on commit 6952199

Please sign in to comment.