From 64106c4d3d4ddba8c7bc2af75376e6d3d3d75601 Mon Sep 17 00:00:00 2001 From: Date: Mon, 29 Jun 2015 20:16:15 +0000 Subject: Update documentation --- gcc/struct.Config.html | 160 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 160 insertions(+) create mode 100644 gcc/struct.Config.html (limited to 'gcc/struct.Config.html') diff --git a/gcc/struct.Config.html b/gcc/struct.Config.html new file mode 100644 index 0000000..3675d21 --- /dev/null +++ b/gcc/struct.Config.html @@ -0,0 +1,160 @@ + + + + + + + + + + gcc::Config - Rust + + + + + + + + + + + + + + + +
+

Struct gcc::Config + + [] + + [src]

+
pub struct Config {
+    // some fields omitted
+}

Extra configuration to pass to gcc.

+

Methods

impl Config

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.

+ +

The other cpp_* options will only become active if this is set to +true.

+
+

Set the standard library to link against when compiling with C++ +support.

+ +

The default value of this property depends on the current target: On +OS X Some("c++") is used, when compiling for a Visual Studio based +target None is used and for other targets Some("stdc++") is used.

+ +

A value of None indicates that no automatic linking should happen, +otherwise cargo will link against the specified library.

+ +

The given library name must not contain the lib prefix.

+

fn cpp_set_stdlib(&mut self, cpp_set_stdlib: Option<&str>) -> &mut Config

+

Force the C++ compiler to use the specified standard library.

+ +

Setting this option will automatically set cpp_link_stdlib to the same +value.

+ +

The default value of this option is always None.

+ +

This option has no effect when compiling for a Visual Studio based +target.

+ +

This option sets the -stdlib flag, which is only supported by some +compilers (clang, icc) but not by others (gcc). The library will not +detect which compiler is used, as such it is the responsibility of the +caller to ensure that this option is only used in conjuction with a +compiler which supports the -stdlib flag.

+ +

A value of None indicates that no specific C++ standard library should +be used, otherwise -stdlib is added to the compile invocation.

+ +

The given library name must not contain the lib prefix.

+

fn compile(&self, output: &str)

+

Run the compiler, generating the file output

+ +

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

+
+ + + + + + + + + + + + + + + \ No newline at end of file -- cgit v1.2.3