pub enum TargetEnvironment {
Gnu,
Musl,
Lamina,
Eabi,
Eabihf,
Freestanding,
}Expand description
The C runtime and ABI a target means.
Variants§
Gnu
glibc, with the architecture’s own floating-point ABI.
Musl
musl libc.
Lamina
Lamina’s own C library, beside musl rather than on top of it.
Reserved: the axis carries the choice so the target grammar is settled, but no
Lamina libc has been written. Every environment-derived property that would name
a file answers None for it, and a link refuses by name.
Eabi
ARM EABI with the soft-float calling convention.
Eabihf
ARM EABI with the hard-float calling convention: floats in VFP registers.
Freestanding
No libc and no compiler runtime: bare metal, or an operating system that supplies its own runtime and leaves nothing for this axis to choose.
Implementations§
Source§impl TargetEnvironment
impl TargetEnvironment
Sourcepub const ALL: [Self; 6]
pub const ALL: [Self; 6]
Every environment a target string may name, in the order the diagnostics list them.
Sourcepub const fn libc(self) -> Option<Libc>
pub const fn libc(self) -> Option<Libc>
The C library this environment links, or None when it links none.
Sourcepub const fn compiler_runtime(self) -> CompilerRuntime
pub const fn compiler_runtime(self) -> CompilerRuntime
Where the 128-bit integer helpers and the other compiler-runtime symbols come from.
Sourcepub const fn hardware_float(self) -> bool
pub const fn hardware_float(self) -> bool
Whether the calling convention passes floating-point values in floating-point registers. This is the eabi/eabihf distinction on 32-bit ARM.