Skip to content

Update crates in Cargo.lock #51917

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jul 5, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1,238 changes: 620 additions & 618 deletions src/Cargo.lock

Large diffs are not rendered by default.

22 changes: 19 additions & 3 deletions src/bootstrap/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -769,6 +769,22 @@ impl<'a> Builder<'a> {

let want_rustdoc = self.doc_tests != DocTests::No;

// We synthetically interpret a stage0 compiler used to build tools as a
// "raw" compiler in that it's the exact snapshot we download. Normally
// the stage0 build means it uses libraries build by the stage0
// compiler, but for tools we just use the precompiled libraries that
// we've downloaded
let use_snapshot = mode == Mode::ToolBootstrap;
assert!(!use_snapshot || stage == 0);

let maybe_sysroot = self.sysroot(compiler);
let sysroot = if use_snapshot {
self.rustc_snapshot_sysroot()
} else {
&maybe_sysroot
};
let libdir = sysroot.join(libdir(&compiler.host));

// Customize the compiler we're running. Specify the compiler to cargo
// as our shim and then pass it some various options used to configure
// how the actual compiler itself is called.
Expand All @@ -784,8 +800,8 @@ impl<'a> Builder<'a> {
"RUSTC_DEBUG_ASSERTIONS",
self.config.rust_debug_assertions.to_string(),
)
.env("RUSTC_SYSROOT", self.sysroot(compiler))
.env("RUSTC_LIBDIR", self.rustc_libdir(compiler))
.env("RUSTC_SYSROOT", &sysroot)
.env("RUSTC_LIBDIR", &libdir)
.env("RUSTC_RPATH", self.config.rust_rpath.to_string())
.env("RUSTDOC", self.out.join("bootstrap/debug/rustdoc"))
.env(
Expand All @@ -809,7 +825,7 @@ impl<'a> Builder<'a> {
cargo.env("RUSTC_ERROR_FORMAT", error_format);
}
if cmd != "build" && cmd != "check" && want_rustdoc {
cargo.env("RUSTDOC_LIBDIR", self.sysroot_libdir(compiler, self.config.build));
cargo.env("RUSTDOC_LIBDIR", &libdir);
}

if mode.is_tool() {
Expand Down
3 changes: 2 additions & 1 deletion src/bootstrap/check.rs
Original file line number Diff line number Diff line change
Expand Up @@ -273,5 +273,6 @@ fn codegen_backend_stamp(builder: &Builder,
/// Cargo's output path for rustdoc in a given stage, compiled by a particular
/// compiler for the specified target.
pub fn rustdoc_stamp(builder: &Builder, compiler: Compiler, target: Interned<String>) -> PathBuf {
builder.cargo_out(compiler, Mode::ToolRustc, target).join(".rustdoc-check.stamp")
builder.cargo_out(compiler, Mode::ToolRustc, target)
.join(".rustdoc-check.stamp")
}
2 changes: 1 addition & 1 deletion src/bootstrap/dist.rs
Original file line number Diff line number Diff line change
Expand Up @@ -957,7 +957,7 @@ impl Step for PlainSourceTarball {
if !has_cargo_vendor {
let mut cmd = builder.cargo(
builder.compiler(0, builder.config.build),
Mode::ToolRustc,
Mode::ToolBootstrap,
builder.config.build,
"install"
);
Expand Down
12 changes: 10 additions & 2 deletions src/bootstrap/doc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -799,14 +799,22 @@ impl Step for Rustdoc {
builder.ensure(tool::Rustdoc { host: compiler.host });

// Symlink compiler docs to the output directory of rustdoc documentation.
let out_dir = builder.stage_out(compiler, Mode::ToolRustc).join(target).join("doc");
let out_dir = builder.stage_out(compiler, Mode::ToolRustc)
.join(target)
.join("doc");
t!(fs::create_dir_all(&out_dir));
builder.clear_if_dirty(&out, &rustdoc);
t!(symlink_dir_force(&builder.config, &out, &out_dir));

// Build cargo command.
let mut cargo = prepare_tool_cargo(
builder, compiler, Mode::ToolRustc, target, "doc", "src/tools/rustdoc");
builder,
compiler,
Mode::ToolRustc,
target,
"doc",
"src/tools/rustdoc",
);

cargo.env("RUSTDOCFLAGS", "--document-private-items");
builder.run(&mut cargo);
Expand Down
23 changes: 18 additions & 5 deletions src/bootstrap/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -328,16 +328,23 @@ pub enum Mode {
/// Build codegen libraries, placing output in the "stageN-codegen" directory
Codegen,

/// Build some tools, placing output in the "stageN-tools" directory.
/// Build some tools, placing output in the "stageN-tools" directory. The
/// "other" here is for miscellaneous sets of tools that are built using the
/// bootstrap compiler in its entirety (target libraries and all).
/// Typically these tools compile with stable Rust.
ToolBootstrap,

/// Compile a tool which uses all libraries we compile (up to rustc).
/// Doesn't use the stage0 compiler libraries like "other", and includes
/// tools like rustdoc, cargo, rls, etc.
ToolStd,
ToolTest,
ToolRustc,
}

impl Mode {
pub fn is_tool(&self) -> bool {
match self {
Mode::ToolStd | Mode::ToolTest | Mode::ToolRustc => true,
Mode::ToolBootstrap | Mode::ToolRustc | Mode::ToolStd => true,
_ => false
}
}
Expand Down Expand Up @@ -547,7 +554,9 @@ impl Build {
Mode::Test => "-test",
Mode::Codegen => "-rustc",
Mode::Rustc => "-rustc",
Mode::ToolStd | Mode::ToolTest | Mode::ToolRustc => "-tools",
Mode::ToolBootstrap => "-bootstrap-tools",
Mode::ToolStd => "-tools",
Mode::ToolRustc => "-tools",
};
self.out.join(&*compiler.host)
.join(format!("stage{}{}", compiler.stage, suffix))
Expand Down Expand Up @@ -656,8 +665,12 @@ impl Build {

/// Returns the libdir of the snapshot compiler.
fn rustc_snapshot_libdir(&self) -> PathBuf {
self.rustc_snapshot_sysroot().join(libdir(&self.config.build))
}

/// Returns the sysroot of the snapshot compiler.
fn rustc_snapshot_sysroot(&self) -> &Path {
self.initial_rustc.parent().unwrap().parent().unwrap()
.join(libdir(&self.config.build))
}

/// Runs a command, printing out nice contextual information if it fails.
Expand Down
5 changes: 4 additions & 1 deletion src/bootstrap/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1806,7 +1806,10 @@ impl Step for RemoteCopyLibs {
builder.info(&format!("REMOTE copy libs to emulator ({})", target));
t!(fs::create_dir_all(builder.out.join("tmp")));

let server = builder.ensure(tool::RemoteTestServer { compiler, target });
let server = builder.ensure(tool::RemoteTestServer {
compiler: compiler.with_stage(0),
target,
});

// Spawn the emulator and wait for it to come online
let tool = builder.tool_exe(Tool::RemoteTestClient);
Expand Down
36 changes: 22 additions & 14 deletions src/bootstrap/tool.rs
Original file line number Diff line number Diff line change
Expand Up @@ -104,9 +104,13 @@ impl Step for ToolBuild {
let is_ext_tool = self.is_ext_tool;

match self.mode {
Mode::ToolStd => builder.ensure(compile::Std { compiler, target }),
Mode::ToolTest => builder.ensure(compile::Test { compiler, target }),
Mode::ToolRustc => builder.ensure(compile::Rustc { compiler, target }),
Mode::ToolRustc => {
builder.ensure(compile::Rustc { compiler, target })
}
Mode::ToolStd => {
builder.ensure(compile::Std { compiler, target })
}
Mode::ToolBootstrap => {} // uses downloaded stage0 compiler libs
_ => panic!("unexpected Mode for tool build")
}

Expand Down Expand Up @@ -341,17 +345,17 @@ macro_rules! tool {
}

tool!(
Rustbook, "src/tools/rustbook", "rustbook", Mode::ToolRustc;
Rustbook, "src/tools/rustbook", "rustbook", Mode::ToolBootstrap;
ErrorIndex, "src/tools/error_index_generator", "error_index_generator", Mode::ToolRustc;
UnstableBookGen, "src/tools/unstable-book-gen", "unstable-book-gen", Mode::ToolStd;
Tidy, "src/tools/tidy", "tidy", Mode::ToolStd;
Linkchecker, "src/tools/linkchecker", "linkchecker", Mode::ToolStd;
CargoTest, "src/tools/cargotest", "cargotest", Mode::ToolStd;
Compiletest, "src/tools/compiletest", "compiletest", Mode::ToolTest, llvm_tools = true;
BuildManifest, "src/tools/build-manifest", "build-manifest", Mode::ToolStd;
RemoteTestClient, "src/tools/remote-test-client", "remote-test-client", Mode::ToolStd;
RustInstaller, "src/tools/rust-installer", "fabricate", Mode::ToolStd;
RustdocTheme, "src/tools/rustdoc-themes", "rustdoc-themes", Mode::ToolStd;
UnstableBookGen, "src/tools/unstable-book-gen", "unstable-book-gen", Mode::ToolBootstrap;
Tidy, "src/tools/tidy", "tidy", Mode::ToolBootstrap;
Linkchecker, "src/tools/linkchecker", "linkchecker", Mode::ToolBootstrap;
CargoTest, "src/tools/cargotest", "cargotest", Mode::ToolBootstrap;
Compiletest, "src/tools/compiletest", "compiletest", Mode::ToolBootstrap, llvm_tools = true;
BuildManifest, "src/tools/build-manifest", "build-manifest", Mode::ToolBootstrap;
RemoteTestClient, "src/tools/remote-test-client", "remote-test-client", Mode::ToolBootstrap;
RustInstaller, "src/tools/rust-installer", "fabricate", Mode::ToolBootstrap;
RustdocTheme, "src/tools/rustdoc-themes", "rustdoc-themes", Mode::ToolBootstrap;
);

#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
Expand Down Expand Up @@ -604,7 +608,11 @@ impl<'a> Builder<'a> {
fn prepare_tool_cmd(&self, compiler: Compiler, tool: Tool, cmd: &mut Command) {
let host = &compiler.host;
let mut lib_paths: Vec<PathBuf> = vec![
PathBuf::from(&self.sysroot_libdir(compiler, compiler.host)),
if compiler.stage == 0 {
self.build.rustc_snapshot_libdir()
} else {
PathBuf::from(&self.sysroot_libdir(compiler, compiler.host))
},
self.cargo_out(compiler, tool.get_mode(), *host).join("deps"),
];

Expand Down