fab.steps.compile_c module#

C file compilation.

class fab.steps.compile_c.MpCommonArgs(config, flags)#

Bases: object

A simple class to pass arguments to subprocesses.

config: BuildConfig#
flags: FlagsConfig#
fab.steps.compile_c.compile_c(config, common_flags=None, path_flags=None, source=None)#

Compiles all C files in all build trees, creating or extending a set of compiled files for each target.

This step uses multiprocessing. All C files are compiled in a single pass.

Uses multiprocessing, unless disabled in the config.

Parameters:
  • config – The fab.build_config.BuildConfig object where we can read settings such as the project workspace folder or the multiprocessing flag.

  • common_flags (Optional[List[str]]) – A list of strings to be included in the command line call, for all files. (default: None)

  • path_flags (Optional[List]) – A list of AddFlags, defining flags to be included in the command line call for selected files. (default: None)

  • source (Optional[ArtefactsGetter]) – An ArtefactsGetter which give us our c files to process. (default: None)

fab.steps.compile_c.store_artefacts(compiled_files, build_lists, artefact_store)#

Create our artefact collection; object files for each compiled file, per root symbol.