pub struct LinkOptions {Show 13 fields
pub use_ld: Option<String>,
pub search: Vec<PathBuf>,
pub passthrough: Vec<String>,
pub prefixes: Vec<PathBuf>,
pub sysroot: Option<PathBuf>,
pub is_static: bool,
pub shared: bool,
pub pie: Option<bool>,
pub no_stdlib: bool,
pub no_startfiles: bool,
pub no_defaultlibs: bool,
pub export_dynamic: bool,
pub strip: bool,
}Expand description
What the command line said about linking.
Kept apart from Options because none of it reaches the compilation. A flag here changes what
the linker is told and changes nothing about the object files handed to it, which is why -lm
on a -c line is a note rather than an error.
Fields§
§use_ld: Option<String>-fuse-ld=<name>, which names a linker rather than a path to one.
search: Vec<PathBuf>-L<dir>, in order, because the linker takes the first library it finds.
passthrough: Vec<String>-Wl,<arg> and -Xlinker <arg>, in order, passed through untouched.
prefixes: Vec<PathBuf>-B<prefix>, which is where to look for the linker before looking on the path.
sysroot: Option<PathBuf>--sysroot=<dir>, which prefixes the directories this looks in.
is_static: bool-static.
-shared.
pie: Option<bool>-pie or -no-pie, and the platform’s default when neither was written.
no_stdlib: bool-nostdlib, which is -nostartfiles and -nodefaultlibs together.
no_startfiles: bool-nostartfiles.
no_defaultlibs: bool-nodefaultlibs.
export_dynamic: bool-rdynamic, which puts every symbol in the dynamic table so a program can look itself up.
strip: bool-s, which drops the symbol table.
Trait Implementations§
Source§impl Clone for LinkOptions
impl Clone for LinkOptions
Source§fn clone(&self) -> LinkOptions
fn clone(&self) -> LinkOptions
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for LinkOptions
impl Debug for LinkOptions
Source§impl Default for LinkOptions
impl Default for LinkOptions
Source§fn default() -> LinkOptions
fn default() -> LinkOptions
impl Eq for LinkOptions
Source§impl PartialEq for LinkOptions
impl PartialEq for LinkOptions
impl StructuralPartialEq for LinkOptions
Auto Trait Implementations§
impl Freeze for LinkOptions
impl RefUnwindSafe for LinkOptions
impl Send for LinkOptions
impl Sync for LinkOptions
impl Unpin for LinkOptions
impl UnsafeUnpin for LinkOptions
impl UnwindSafe for LinkOptions
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.