Struct gcc::Tool [−][src]
pub struct Tool { /* fields omitted */ }
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]
impl Tool
pub fn to_command(&self) -> Command
[src]
pub fn to_command(&self) -> Command
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]
pub fn path(&self) -> &Path
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]
pub fn args(&self) -> &[OsString]
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]
pub fn env(&self) -> &[(OsString, OsString)]
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]
impl Clone for Tool
fn clone(&self) -> Tool
[src]
fn clone(&self) -> Tool
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
impl Debug for Tool
[src]
impl Debug for Tool