Update a few comments.
This commit is contained in:
parent
6766abbfa9
commit
743af95d4b
2 changed files with 11 additions and 18 deletions
|
@ -75,16 +75,11 @@ fn main() {
|
||||||
Err(_) => 0,
|
Err(_) => 0,
|
||||||
};
|
};
|
||||||
|
|
||||||
// Build scripts always use the snapshot compiler which is guaranteed to be
|
// Use a different compiler for build scripts, since there may not yet be a
|
||||||
// able to produce an executable, whereas intermediate compilers may not
|
// libstd for the real compiler to use. However, if Cargo is attempting to
|
||||||
// have the standard library built yet and may not be able to produce an
|
// determine the version of the compiler, the real compiler needs to be
|
||||||
// executable. Otherwise we just use the standard compiler we're
|
// used. Currently, these two states are differentiated based on whether
|
||||||
// bootstrapping with.
|
// --target and -vV is/isn't passed.
|
||||||
//
|
|
||||||
// Also note that cargo will detect the version of the compiler to trigger
|
|
||||||
// a rebuild when the compiler changes. If this happens, we want to make
|
|
||||||
// sure to use the actual compiler instead of the snapshot compiler becase
|
|
||||||
// that's the one that's actually changing.
|
|
||||||
let (rustc, libdir) = if target.is_none() && version.is_none() {
|
let (rustc, libdir) = if target.is_none() && version.is_none() {
|
||||||
("RUSTC_SNAPSHOT", "RUSTC_SNAPSHOT_LIBDIR")
|
("RUSTC_SNAPSHOT", "RUSTC_SNAPSHOT_LIBDIR")
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -175,7 +175,9 @@ pub struct Build {
|
||||||
lldb_python_dir: Option<String>,
|
lldb_python_dir: Option<String>,
|
||||||
|
|
||||||
// Runtime state filled in later on
|
// Runtime state filled in later on
|
||||||
|
// target -> (cc, ar)
|
||||||
cc: HashMap<String, (gcc::Tool, Option<PathBuf>)>,
|
cc: HashMap<String, (gcc::Tool, Option<PathBuf>)>,
|
||||||
|
// host -> (cc, ar)
|
||||||
cxx: HashMap<String, gcc::Tool>,
|
cxx: HashMap<String, gcc::Tool>,
|
||||||
crates: HashMap<String, Crate>,
|
crates: HashMap<String, Crate>,
|
||||||
is_sudo: bool,
|
is_sudo: bool,
|
||||||
|
@ -202,20 +204,16 @@ struct Crate {
|
||||||
/// build system, with each mod generating output in a different directory.
|
/// build system, with each mod generating output in a different directory.
|
||||||
#[derive(Clone, Copy, PartialEq, Eq)]
|
#[derive(Clone, Copy, PartialEq, Eq)]
|
||||||
pub enum Mode {
|
pub enum Mode {
|
||||||
/// This cargo is going to build the standard library, placing output in the
|
/// Build the standard library, placing output in the "stageN-std" directory.
|
||||||
/// "stageN-std" directory.
|
|
||||||
Libstd,
|
Libstd,
|
||||||
|
|
||||||
/// This cargo is going to build libtest, placing output in the
|
/// Build libtest, placing output in the "stageN-test" directory.
|
||||||
/// "stageN-test" directory.
|
|
||||||
Libtest,
|
Libtest,
|
||||||
|
|
||||||
/// This cargo is going to build librustc and compiler libraries, placing
|
/// Build librustc and compiler libraries, placing output in the "stageN-rustc" directory.
|
||||||
/// output in the "stageN-rustc" directory.
|
|
||||||
Librustc,
|
Librustc,
|
||||||
|
|
||||||
/// This cargo is going to build some tool, placing output in the
|
/// Build some tool, placing output in the "stageN-tools" directory.
|
||||||
/// "stageN-tools" directory.
|
|
||||||
Tool,
|
Tool,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue