pub struct RustcPrivateCompilers {
build_compiler: Compiler,
target_compiler: Compiler,
}
Expand description
Represents which compilers are involved in the compilation of a tool
that depends on compiler internals (rustc_private
).
Their compilation looks like this:
build_compiler
(stage N-1) buildstarget_compiler
(stage N) to produce .rlibs- These .rlibs are copied into the sysroot of
build_compiler
- These .rlibs are copied into the sysroot of
build_compiler
(stage N-1) builds<tool>
(stage N)<tool>
links to .rlibs fromtarget_compiler
Eventually, this could also be used for .rmetas and check builds, but so far we only deal with normal builds here.
Fields§
§build_compiler: Compiler
Compiler that builds the tool and that builds target_compiler
.
target_compiler: Compiler
Compiler to which .rlib artifacts the tool links to. The host target of this compiler corresponds to the target of the tool.
Implementations§
Source§impl RustcPrivateCompilers
impl RustcPrivateCompilers
Sourcepub fn new(builder: &Builder<'_>, stage: u32, target: TargetSelection) -> Self
pub fn new(builder: &Builder<'_>, stage: u32, target: TargetSelection) -> Self
Create compilers for a rustc_private
tool with the given stage
and for the given
target
.
pub fn from_build_and_target_compiler( build_compiler: Compiler, target_compiler: Compiler, ) -> Self
Sourcepub fn from_build_compiler(
builder: &Builder<'_>,
build_compiler: Compiler,
target: TargetSelection,
) -> Self
pub fn from_build_compiler( builder: &Builder<'_>, build_compiler: Compiler, target: TargetSelection, ) -> Self
Create rustc tool compilers from the build compiler.
Sourcepub fn from_target_compiler(
builder: &Builder<'_>,
target_compiler: Compiler,
) -> Self
pub fn from_target_compiler( builder: &Builder<'_>, target_compiler: Compiler, ) -> Self
Create rustc tool compilers from the target compiler.
fn build_compiler_from_stage(builder: &Builder<'_>, stage: u32) -> Compiler
pub fn build_compiler(&self) -> Compiler
pub fn target_compiler(&self) -> Compiler
Sourcepub fn target(&self) -> TargetSelection
pub fn target(&self) -> TargetSelection
Target of the tool being compiled
Trait Implementations§
Source§impl Clone for RustcPrivateCompilers
impl Clone for RustcPrivateCompilers
Source§fn clone(&self) -> RustcPrivateCompilers
fn clone(&self) -> RustcPrivateCompilers
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for RustcPrivateCompilers
impl Debug for RustcPrivateCompilers
Source§impl Hash for RustcPrivateCompilers
impl Hash for RustcPrivateCompilers
Source§impl PartialEq for RustcPrivateCompilers
impl PartialEq for RustcPrivateCompilers
impl Copy for RustcPrivateCompilers
impl Eq for RustcPrivateCompilers
impl StructuralPartialEq for RustcPrivateCompilers
Auto Trait Implementations§
impl Freeze for RustcPrivateCompilers
impl RefUnwindSafe for RustcPrivateCompilers
impl Send for RustcPrivateCompilers
impl Sync for RustcPrivateCompilers
impl Unpin for RustcPrivateCompilers
impl UnwindSafe for RustcPrivateCompilers
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: 80 bytes