[−][src]Trait genlink::Linker
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
)
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.