pub struct GccCodegenBackend {
compilers: RustcPrivateCompilers,
targets: Vec<TargetSelection>,
}Expand description
Builds the GCC codegen backend (cg_gcc).
The cg_gcc backend uses libgccjit, which requires a separate build for each
host -> target pair. So if you are on linux-x64 and build for linux-aarch64,
you will need at least:
- linux-x64 -> linux-x64 libgccjit (for building host code like proc macros)
- linux-x64 -> linux-aarch64 libgccjit (for the aarch64 target code)
We model this by having a single cg_gcc for a given host target, which contains one
libgccjit per (host, target) pair.
Note that the host target is taken from self.compilers.target_compiler.host.
Fields§
§compilers: RustcPrivateCompilers§targets: Vec<TargetSelection>Implementations§
Source§impl GccCodegenBackend
impl GccCodegenBackend
Sourcepub fn for_targets(
compilers: RustcPrivateCompilers,
targets: Vec<TargetSelection>,
) -> Self
pub fn for_targets( compilers: RustcPrivateCompilers, targets: Vec<TargetSelection>, ) -> Self
Build cg_gcc that will run on host H (compilers.target_compiler.host) and will be
able to produce code target pairs (H, T) for all T from targets.
Trait Implementations§
Source§impl Clone for GccCodegenBackend
impl Clone for GccCodegenBackend
Source§fn clone(&self) -> GccCodegenBackend
fn clone(&self) -> GccCodegenBackend
1.0.0§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for GccCodegenBackend
impl Debug for GccCodegenBackend
Source§impl Hash for GccCodegenBackend
impl Hash for GccCodegenBackend
Source§impl PartialEq for GccCodegenBackend
impl PartialEq for GccCodegenBackend
Source§impl Step for GccCodegenBackend
impl Step for GccCodegenBackend
Source§const IS_HOST: bool = true
const IS_HOST: bool = true
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§type Output = GccCodegenBackendOutput
type Output = GccCodegenBackendOutput
Step::run.Source§fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_>
fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_>
Source§fn make_run(run: RunConfig<'_>)
fn make_run(run: RunConfig<'_>)
Step handler when not triggered indirectly by other Steps 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 run(self, builder: &Builder<'_>) -> Self::Output
fn run(self, builder: &Builder<'_>) -> Self::Output
Step logic. Read moreSource§fn metadata(&self) -> Option<StepMetadata>
fn metadata(&self) -> Option<StepMetadata>
impl Eq for GccCodegenBackend
impl StructuralPartialEq for GccCodegenBackend
Auto Trait Implementations§
impl Freeze for GccCodegenBackend
impl RefUnwindSafe for GccCodegenBackend
impl Send for GccCodegenBackend
impl Sync for GccCodegenBackend
impl Unpin for GccCodegenBackend
impl UnwindSafe for GccCodegenBackend
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
clone_to_uninit)§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: 104 bytes