[][src]Trait genlink::Linker

pub trait Linker {
    fn name(&self) -> &'static OsStr;
fn output(&self, cmd: &mut Command, path: &OsStr);
fn lib(&self, cmd: &mut Command, path: &OsStr);
fn path(&self, cmd: &mut Command, path: &OsStr); fn default_output(&self) -> &'static OsStr { ... }
fn preproc(&self, cmd: &mut Command) { ... }
fn obj(&self, cmd: &mut Command, path: &OsStr) { ... } }

The Trait to Integrate Linkers

Required methods

fn name(&self) -> &'static OsStr

Return the name of your linker.

fn output(&self, cmd: &mut Command, path: &OsStr)

Set the output file. (like ld -o)

fn lib(&self, cmd: &mut Command, path: &OsStr)

Search and add library in the library path. (like ld -l)

fn path(&self, cmd: &mut Command, path: &OsStr)

Add library searching path. (like ld -L)

Loading content...

Provided methods

fn default_output(&self) -> &'static OsStr

Return the default output file.

As the default, this function returns "a.out".

fn preproc(&self, cmd: &mut Command)

Preprocess the linker. (set required arguments, variables, etc.)

As the default, this function does nothing.

fn obj(&self, cmd: &mut Command, path: &OsStr)

Add an object.

As the default, this function just adds the path to the arguments.

Loading content...

Implementors

Loading content...