pub enum LinkSelfContainedDefault {
True,
False,
InferredForMusl,
InferredForMingw,
WithComponents(LinkSelfContainedComponents),
}
Expand description
The different -Clink-self-contained
options that can be specified in a target spec:
- enabling or disabling in bulk
- some target-specific pieces of inference to determine whether to use self-contained linking
if
-Clink-self-contained
is not specified explicitly (e.g. on musl/mingw) - explicitly enabling some of the self-contained linking components, e.g. the linker component
to use
rust-lld
Variants§
True
The target spec explicitly enables self-contained linking.
False
The target spec explicitly disables self-contained linking.
InferredForMusl
The target spec requests that the self-contained mode is inferred, in the context of musl.
InferredForMingw
The target spec requests that the self-contained mode is inferred, in the context of mingw.
WithComponents(LinkSelfContainedComponents)
The target spec explicitly enables a list of self-contained linking components: e.g. for
targets opting into a subset of components like the CLI’s -C link-self-contained=+linker
.
Implementations§
Source§impl LinkSelfContainedDefault
impl LinkSelfContainedDefault
Sourcepub fn is_disabled(self) -> bool
pub fn is_disabled(self) -> bool
Returns whether the target spec has self-contained linking explicitly disabled. Used to emit errors if the user then enables it on the CLI.
Sourcefn json_key(self) -> &'static str
fn json_key(self) -> &'static str
Returns the key to use when serializing the setting to json:
- individual components in a
link-self-contained
object value - the other variants as a backwards-compatible
crt-objects-fallback
string
Sourcepub fn with_linker() -> LinkSelfContainedDefault
pub fn with_linker() -> LinkSelfContainedDefault
Creates a LinkSelfContainedDefault
enabling the self-contained linker for target specs
(the equivalent of -Clink-self-contained=+linker
on the CLI).
Trait Implementations§
Source§impl Clone for LinkSelfContainedDefault
impl Clone for LinkSelfContainedDefault
Source§fn clone(&self) -> LinkSelfContainedDefault
fn clone(&self) -> LinkSelfContainedDefault
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for LinkSelfContainedDefault
impl Debug for LinkSelfContainedDefault
Source§impl FromStr for LinkSelfContainedDefault
impl FromStr for LinkSelfContainedDefault
Parses a backwards-compatible -Clink-self-contained
option string, without components.
Source§impl PartialEq for LinkSelfContainedDefault
impl PartialEq for LinkSelfContainedDefault
impl Copy for LinkSelfContainedDefault
impl StructuralPartialEq for LinkSelfContainedDefault
Auto Trait Implementations§
impl DynSend for LinkSelfContainedDefault
impl DynSync for LinkSelfContainedDefault
impl Freeze for LinkSelfContainedDefault
impl RefUnwindSafe for LinkSelfContainedDefault
impl Send for LinkSelfContainedDefault
impl Sync for LinkSelfContainedDefault
impl Unpin for LinkSelfContainedDefault
impl UnwindSafe for LinkSelfContainedDefault
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§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> WithSubscriber for T
impl<T> WithSubscriber for T
Source§fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
Source§fn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
impl<'a, T> Captures<'a> for Twhere
T: ?Sized,
Layout§
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...)
attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 2 bytes
Size for each variant:
True
: 0 bytesFalse
: 0 bytesInferredForMusl
: 0 bytesInferredForMingw
: 0 bytesWithComponents
: 1 byte