NAME
App::hopen::T::MSCL::C - support for the GNU toolset, C language
SYNOPSIS
In a hopen file:
use language 'C';
# Use via Data::Hopen::G::GraphBuilder:
$Build->H::files(...)->C::compile->default_goal;
The inputs come from earlier in the build graph. TODO support specifying compiler arguments.
STATIC FUNCTIONS
Arguments to the static functions are parsed using Getargs::Mixed (via "getparameters" in Data::Hopen). Therefore, named arguments start with a hyphen (e.g., -name=>'foo'
, not name=>'foo'
).
compile
Create a new compilation command. Inputs come from the build graph, so parameters other than -name
are disregarded (TODO permit specifying compilation options or object-file names). Usage:
use language 'C';
$builder_or_dag->H::files('file1.c')->C::compile([-name=>'node name']);
link
Create a new link command. Pass the name of the executable. Object files are on the incoming asset-graph edges. Usage:
use language 'C';
$builder_or_dag->C::link([-exe=>]'output_file_name'[, [-name=>]'node name']);
TODO? Permit specifying that you want ld
or another linker instead of using the compiler?
INTERNALS
_find_compiler
Find the C compiler. Called when this package is first loaded.
TODO permit the user to specify an alternative compiler to use
TODO should this happen when the DAG runs? Maybe toolsets should get the chance to add a node to the beginning of the graph, before anything else runs. TODO figure this out.