pub enum Mode {
Std,
Rustc,
Codegen,
ToolBootstrap,
ToolTarget,
ToolStd,
ToolRustc,
}
Expand description
The various “modes” of invoking Cargo.
These entries currently correspond to the various output directories of the build system, with each mod generating output in a different directory.
Variants§
Std
Build the standard library, placing output in the “stageN-std” directory.
Rustc
Build librustc, and compiler libraries, placing output in the “stageN-rustc” directory.
Codegen
Build a codegen backend for rustc, placing the output in the “stageN-codegen” directory.
ToolBootstrap
Build a tool, placing output in the “bootstrap-tools” directory. This is for miscellaneous sets of tools that extend bootstrap.
These tools are intended to be only executed on the host system that invokes bootstrap, and they thus cannot be cross-compiled.
They are always built using the stage0 compiler, and they can be compiled with stable Rust.
These tools also essentially do not participate in staging.
ToolTarget
Build a cross-compilable helper tool. These tools do not depend on unstable features or
compiler internals, but they might be cross-compilable (so we cannot build them using the
stage0 compiler, unlike ToolBootstrap
).
Some of these tools are also shipped in our dist
archives.
While we could compile them using the stage0 compiler when not cross-compiling, we instead
use the in-tree compiler (and std) to build them, so that we can ship e.g. std security
fixes and avoid depending fully on stage0 for the artifacts that we ship.
This mode is used e.g. for linkers and linker tools invoked by rustc on its host target.
ToolStd
Build a tool which uses the locally built std, placing output in the “stageN-tools” directory. Its usage is quite rare, mainly used by compiletest which needs libtest.
ToolRustc
Build a tool which uses the locally built rustc and the target std, placing the output in the “stageN-tools” directory. This is used for anything that needs a fully functional rustc, such as rustdoc, clippy, cargo, rustfmt, miri, etc.
Implementations§
Trait Implementations§
impl Copy for Mode
impl Eq for Mode
impl StructuralPartialEq for Mode
Auto Trait Implementations§
impl Freeze for Mode
impl RefUnwindSafe for Mode
impl Send for Mode
impl Sync for Mode
impl Unpin for Mode
impl UnwindSafe for Mode
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Pointable for T
impl<T> Pointable for T
Layout§
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...)
attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 1 byte
Size for each variant:
Std
: 0 bytesRustc
: 0 bytesCodegen
: 0 bytesToolBootstrap
: 0 bytesToolTarget
: 0 bytesToolStd
: 0 bytesToolRustc
: 0 bytes