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, 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 anArchiveObjects
step, and falls back to using output from compiler steps.- Parameters:
config – The
fab.build_config.BuildConfig
object where we can read settings such as the project workspace folder or the multiprocessing flag.flags – A list of flags to pass to the linker. (default:
None
)source (
Optional
[ArtefactsGetter
]) – An optionalArtefactsGetter
. It defaults to the output from compiler steps, which typically is the expected behaviour. (default:None
)
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.BuildConfig
object 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 – A list of flags to pass to the linker. (default:
None
)source (
Optional
[ArtefactsGetter
]) – An optionalArtefactsGetter
. Typically not required, as there is a sensible default. (default:None
)