Skip to content

Commit 6952199

Browse files
End of rustdoc-js tool add into builder
1 parent 50bb6ba commit 6952199

File tree

4 files changed

+11
-5
lines changed

4 files changed

+11
-5
lines changed

src/bootstrap/builder.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -445,7 +445,8 @@ impl<'a> Builder<'a> {
445445
let out_dir = self.stage_out(compiler, mode);
446446
cargo.env("CARGO_TARGET_DIR", out_dir)
447447
.arg(cmd)
448-
.arg("--target").arg(target);
448+
.arg("--target")
449+
.arg(target);
449450

450451
// If we were invoked from `make` then that's already got a jobserver
451452
// set up for us so no need to tell Cargo about jobs all over again.

src/bootstrap/check.rs

+7-1
Original file line numberDiff line numberDiff line change
@@ -427,6 +427,7 @@ fn path_for_cargo(builder: &Builder, compiler: Compiler) -> OsString {
427427
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
428428
pub struct RustdocJS {
429429
pub host: Interned<String>,
430+
pub target: Interned<String>,
430431
}
431432

432433
impl Step for RustdocJS {
@@ -435,19 +436,24 @@ impl Step for RustdocJS {
435436
const ONLY_HOSTS: bool = true;
436437

437438
fn should_run(run: ShouldRun) -> ShouldRun {
438-
run.path("src/tests/rustdoc-js")
439+
run.path("src/test/rustdoc-js")
439440
}
440441

441442
fn make_run(run: RunConfig) {
442443
run.builder.ensure(RustdocJS {
443444
host: run.host,
445+
target: run.target,
444446
});
445447
}
446448

447449
fn run(self, builder: &Builder) {
448450
let nodejs = builder.config.nodejs.clone();
449451
let mut command = Command::new(&nodejs.expect("no nodejs found"));
450452
command.args(&["src/tools/rustdoc-js/tester.js", &*self.host]);
453+
builder.ensure(::doc::Std {
454+
target: self.target,
455+
stage: builder.top_stage,
456+
});
451457
builder.run(&mut command);
452458
}
453459
}

src/bootstrap/doc.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -418,8 +418,8 @@ impl Step for Standalone {
418418

419419
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
420420
pub struct Std {
421-
stage: u32,
422-
target: Interned<String>,
421+
pub stage: u32,
422+
pub target: Interned<String>,
423423
}
424424

425425
impl Step for Std {

src/bootstrap/tool.rs

-1
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,6 @@ tool!(
260260
BuildManifest, "src/tools/build-manifest", "build-manifest", Mode::Libstd;
261261
RemoteTestClient, "src/tools/remote-test-client", "remote-test-client", Mode::Libstd;
262262
RustInstaller, "src/tools/rust-installer", "fabricate", Mode::Libstd;
263-
RustdocJS, "rustdoc-js", "js-tests", Mode::Tool;
264263
);
265264

266265
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]

0 commit comments

Comments
 (0)