struct RustcLink {
build_compiler: Compiler,
sysroot_compiler: Compiler,
target: TargetSelection,
crates: Vec<String>,
}
Expand description
RustcLink
copies compiler rlibs from a rustc build into a compiler sysroot.
It works with (potentially up to) three compilers:
build_compiler
is a compiler that built rustc rlibssysroot_compiler
is a compiler into whose sysroot we will copy the rlibs- In most situations,
build_compiler
==sysroot_compiler
- In most situations,
target_compiler
is the compiler whose rlibs were built. It is not represented explicitly in this step, rather we just read the rlibs from a rustc build stamp ofbuild_compiler
.
This is necessary for tools using rustc_private
, where the previous compiler will build
a tool against the next compiler.
To build a tool against a compiler, the rlibs of that compiler that it links against
must be in the sysroot of the compiler that’s doing the compiling.
Fields§
§build_compiler: Compiler
This compiler built some rustc, whose rlibs we will copy into a sysroot.
sysroot_compiler: Compiler
This is the compiler into whose sysroot we want to copy the built rlibs.
In most cases, it will correspond to build_compiler
.
target: TargetSelection
§crates: Vec<String>
Not actually used; only present to make sure the cache invalidation is correct.
Implementations§
Source§impl RustcLink
impl RustcLink
Sourcefn from_rustc(rustc: Rustc) -> Self
fn from_rustc(rustc: Rustc) -> Self
Copy rlibs from the build compiler that build this rustc
into the sysroot of that
build compiler.
Sourcefn from_build_compiler_and_sysroot(
build_compiler: Compiler,
sysroot_compiler: Compiler,
target: TargetSelection,
crates: Vec<String>,
) -> Self
fn from_build_compiler_and_sysroot( build_compiler: Compiler, sysroot_compiler: Compiler, target: TargetSelection, crates: Vec<String>, ) -> Self
Copy rlibs built by build_compiler
into the sysroot of sysroot_compiler
.
Trait Implementations§
Source§impl Step for RustcLink
impl Step for RustcLink
Source§fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_>
fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_>
Step
should be run when given specific paths (e.g., x build $path
).Source§const DEFAULT: bool = false
const DEFAULT: bool = false
describe
macro in Builder::get_step_descriptions
. Read moreSource§const IS_HOST: bool = false
const IS_HOST: bool = false
run.target
passed to the make_run
function of
this Step will be determined based on the --host
flag.
If this value is false, then they will be determined based on the --target
flag. Read moreSource§fn make_run(_run: RunConfig<'_>)
fn make_run(_run: RunConfig<'_>)
Step
handler when not triggered indirectly by other Step
s using Builder::ensure
.
For example, ./x.py test bootstrap
runs this for test::Bootstrap
. Similarly, ./x.py test
runs it for every step
that is listed by the describe
macro in Builder::get_step_descriptions
.Source§fn metadata(&self) -> Option<StepMetadata>
fn metadata(&self) -> Option<StepMetadata>
impl Eq for RustcLink
impl StructuralPartialEq for RustcLink
Auto Trait Implementations§
impl Freeze for RustcLink
impl RefUnwindSafe for RustcLink
impl Send for RustcLink
impl Sync for RustcLink
impl Unpin for RustcLink
impl UnwindSafe for RustcLink
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: 136 bytes