pub enum Unsupported {
Format {
target: String,
format: &'static str,
},
MsvcAbi {
target: String,
},
Machine {
target: String,
},
StaticStub {
target: String,
},
}Expand description
A target, or a combination of a target and a mode, that has no line here.
Four variants and they are different kinds of answer. A format is not supported yet and will be. The MSVC ABI is waiting on something that is not code. A static glibc link is not a thing this scheme can produce at all. The distinction matters to somebody reading the message, because only some of them are worth waiting for.
Variants§
Format
The target’s object format is neither ELF nor PE, and the linker for it wants a different line rather than a different spelling of this one.
Fields
MsvcAbi
A Windows target in Microsoft’s ABI whose architecture Microsoft ships no C library for.
ARM64EC, which is the one row this is. It is tier 4 in
spec/cross-compile/04-target-matrix.md, nothing in this compiler emits code for it, and
what the installer manifest has for it is a few kilobytes of thunks rather than a CRT, so
Chip::of has no answer for it and there are no directories to name. x86-64 and AArch64
in the same environment have a line, which is msvc.
Machine
A PE target whose architecture has no machine type among the ones a PE linker writes.
Unreachable through the target table, which has three mingw-w64 rows and an ARM64EC one that the MSVC ABI refuses first. It is a variant rather than a panic because the table is data and a row added to it should produce a sentence rather than a crash.
StaticStub
A static link against a libc that is a stub.
spec/cross-compile/09-libc-stubs.md section 9.1 is the reason: a stub carries the names a
library exports and none of the code behind them, which is everything a dynamic link needs
and nothing a static one does. glibc’s own libc.a is several megabytes of objects that
cannot be synthesized from a description of an interface, so this combination is refused
here rather than failing later with several thousand undefined symbols.
Every crate::link::Libc::Stub target, which is glibc and also bionic, the BSDs and
illumos. musl is the exception rather than the rule here, because musl is the one whose libc
we build from source.
Trait Implementations§
Source§impl Clone for Unsupported
impl Clone for Unsupported
Source§impl Debug for Unsupported
impl Debug for Unsupported
Source§impl Display for Unsupported
impl Display for Unsupported
impl Eq for Unsupported
Source§impl Error for Unsupported
impl Error for Unsupported
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()