[−][src]Struct gcc::Tool
Configuration used to represent an invocation of a C compiler.
This can be used to figure out what compiler is in use, what the arguments
to it are, and what the environment variables look like for the compiler.
This can be used to further configure other build systems (e.g. forward
along CC and/or CFLAGS) or the to_command
method can be used to run the
compiler itself.
Methods
impl Tool
[src]
pub fn to_command(&self) -> Command
[src]
Converts this compiler into a Command
that's ready to be run.
This is useful for when the compiler needs to be executed and the command returned will already have the initial arguments and environment variables configured.
pub fn path(&self) -> &Path
[src]
Returns the path for this compiler.
Note that this may not be a path to a file on the filesystem, e.g. "cc", but rather something which will be resolved when a process is spawned.
pub fn args(&self) -> &[OsString]
[src]
Returns the default set of arguments to the compiler needed to produce executables for the target this compiler generates.
pub fn env(&self) -> &[(OsString, OsString)]
[src]
Returns the set of environment variables needed for this compiler to operate.
This is typically only used for MSVC compilers currently.
Trait Implementations
impl Clone for Tool
[src]
fn clone(&self) -> Tool
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl Debug for Tool
[src]
Auto Trait Implementations
impl Unpin for Tool
impl Sync for Tool
impl Send for Tool
impl UnwindSafe for Tool
impl RefUnwindSafe for Tool
Blanket Implementations
impl<T> From<T> for T
[src]
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,