pub struct LinkFlags {
pub search_paths: Vec<PathBuf>,
pub libs: Vec<String>,
}
Expand description
Parse compiler linker flags, -L
and -l
- Search paths defined by
-L
will be removed if not exists, and will be canonicalize
use openblas_build::*;
let info = LinkFlags::parse("-L/usr/lib/gcc/x86_64-pc-linux-gnu/10.2.0 -L/usr/lib/gcc/x86_64-pc-linux-gnu/10.2.0/../../../../lib -L/lib/../lib -L/usr/lib/../lib -L/usr/lib/gcc/x86_64-pc-linux-gnu/10.2.0/../../.. -lc").unwrap();
assert_eq!(info.libs, vec!["c"]);
Fields§
§search_paths: Vec<PathBuf>
Existing paths specified by -L
libs: Vec<String>
Libraries specified by -l
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for LinkFlags
impl RefUnwindSafe for LinkFlags
impl Send for LinkFlags
impl Sync for LinkFlags
impl Unpin for LinkFlags
impl UnwindSafe for LinkFlags
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