#[non_exhaustive]pub struct ParseOptions {
pub cache_native_links: bool,
pub custom_target_search: bool,
}Expand description
What the caller is prepared to model beyond the default tier.
The parser itself stays pure: whether the host can describe its linker precisely enough to key a native link is the caller’s question, and the answer arrives here rather than being read out of the environment.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.cache_native_links: boolAdmit natively linked test binaries, executables, and proc macros, given a linker identity in the action key. Off by default.
custom_target_search: boolrustc may resolve this invocation’s bare --target NAME to a custom
specification: a NAME.json under RUST_TARGET_PATH or a
lib/rustlib/NAME/target.json in the sysroot exists. Such a target
chooses its own static-library file names, which the parser cannot
know, so -l static bypasses.
Implementations§
Source§impl ParseOptions
impl ParseOptions
Sourcepub fn caching_native_links(enabled: bool) -> Self
pub fn caching_native_links(enabled: bool) -> Self
Options that admit native links when enabled.
Sourcepub fn with_custom_target_search(self, enabled: bool) -> Self
pub fn with_custom_target_search(self, enabled: bool) -> Self
Options that also say whether rustc could resolve a bare target name to a custom specification.
Trait Implementations§
Source§impl Clone for ParseOptions
impl Clone for ParseOptions
Source§fn clone(&self) -> ParseOptions
fn clone(&self) -> ParseOptions
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more