Struct gcc::Config [] [src]

pub struct Config {
    // some fields omitted
}

Extra configuration to pass to gcc.

Methods

impl Config
[src]

fn new() -> Config

Construct a new instance of a blank set of configuration.

This builder is finished with the compile function.

fn include<P: AsRef<Path>>(&mut self, dir: P) -> &mut Config

Add a directory to the -I or include path for headers

fn define(&mut self, var: &str, val: Option<&str>) -> &mut Config

Specify a -D variable with an optional value.

fn object<P: AsRef<Path>>(&mut self, obj: P) -> &mut Config

Add an arbitrary object file to link in

fn flag(&mut self, flag: &str) -> &mut Config

Add an arbitrary flag to the invocation of the compiler

fn file<P: AsRef<Path>>(&mut self, p: P) -> &mut Config

Add a file which will be compiled

fn cpp(&mut self, cpp: bool) -> &mut Config

Set C++ support

fn compile(&self, output: &str)

Run the compiler, generating the file output

The name output must begin with lib and end with .a