pub enum Item {
File(String),
Library(String),
Linker(String),
}Expand description
One item on the link line, in the order it was written, because link order is semantic.
A library named before the object that needs it is not found on a static link, which is the oldest surprise in the toolchain and the reason this is one ordered list rather than a list of files and a list of libraries.
Variants§
File(String)
A file: an object this compilation produced, or one named on the command line.
Library(String)
-l<name>, which the linker resolves against its search path.
Linker(String)
One word from -Wl, or -Xlinker, handed to the linker where the user wrote it.
Here rather than in a list of its own because a great many of the linker’s options are a
bracket around the files after them, and an option moved away from what it brackets means
something else or nothing at all. --whole-archive says that every member of every archive
named after it goes in whether anything referenced it or not, --start-group says that the
archives after it are searched again until nothing more comes out, and -Bstatic says which
half of a library that ships both is wanted. Collecting them and appending them to the end
leaves each of those pointing at nothing.
Trait Implementations§
impl Eq for Item
impl StructuralPartialEq for Item
Auto Trait Implementations§
impl Freeze for Item
impl RefUnwindSafe for Item
impl Send for Item
impl Sync for Item
impl Unpin for Item
impl UnsafeUnpin for Item
impl UnwindSafe for Item
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,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.