fab.steps.link#
Link an executable.
Functions
|
Link object files into an executable for every build target. |
|
Produce a shared object (.so) file from the given build target. |
Classes
A source getter specifically for linking. |
- class fab.steps.link.DefaultLinkerSource#
A source getter specifically for linking. Looks for the default output from archiving objects, falls back to default compiler output. This allows a link step to work with or without a preceding object archive step.
- fab.steps.link.link_exe(config, libs=None, flags=None, source=None)#
Link object files into an executable for every build target.
Expects one or more build targets from its artefact getter, of the form Dict[name, object_files].
The default artefact getter,
DefaultLinkerSource, looks for any output from anArchiveObjectsstep, and falls back to using output from compiler steps.- Parameters:
config – The
fab.build_config.BuildConfigobject where we can read settings such as the project workspace folder or the multiprocessing flag.libs (
List[str] |None) – A list of required library names to pass to the linker. (default:None)flags (
List[str] |None) – A list of additional flags to pass to the linker. (default:None)source (
ArtefactsGetter|None) – An optionalArtefactsGetter. It defaults to the output from compiler steps, which typically is the expected behaviour. (default:None)
- Return type:
Produce a shared object (.so) file from the given build target.
Expects a single build target from its artefact getter, of the form Dict[None, object_files]. We can assume the list of object files is the entire project source, compiled.
Params are as for
LinkerBase, with the addition of:- Parameters:
config – The
fab.build_config.BuildConfigobject where we can read settings such as the project workspace folder or the multiprocessing flag.output_fpath (
str) – File path of the shared object to create.flags (
List[str] |None) – A list of flags to pass to the linker. (default:None)source (
ArtefactsGetter|None) – An optionalArtefactsGetter. Typically not required, as there is a sensible default. (default:None)