pub enum LinkerFlag {
SearchPath(String),
Library {
name: String,
kind: LinkKind,
},
LinkerArg(String),
}Expand description
A parsed linker flag from pkg-config output.
These are the structured representations of flags parsed from
pkg-config --static --libs output.
Variants§
SearchPath(String)
Library search path (-L/path/to/libs).
Emitted as cargo:rustc-link-search=native=/path/to/libs.
Library
Library to link (-lname or -l:libname.a).
The LinkKind determines the exact cargo directive format.
Fields
LinkerArg(String)
Raw linker argument (-Wl,--export-dynamic, etc.).
Only certain linker arguments are preserved (e.g., --export-dynamic,
--as-needed). The --whole-archive markers are consumed internally
and converted to LinkKind::WholeArchive on affected libraries.
Trait Implementations§
Source§impl Clone for LinkerFlag
impl Clone for LinkerFlag
Source§fn clone(&self) -> LinkerFlag
fn clone(&self) -> LinkerFlag
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for LinkerFlag
impl RefUnwindSafe for LinkerFlag
impl Send for LinkerFlag
impl Sync for LinkerFlag
impl Unpin for LinkerFlag
impl UnwindSafe for LinkerFlag
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
Mutably borrows from an owned value. Read more