App::hopen::T::Gnu::C - support for the GNU toolset, C language


In a hopen file:

    use language 'C';

    # Use via Data::Hopen::G::GraphBuilder:

The inputs come from earlier in the build graph. TODO support specifying compiler arguments.


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').


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']);

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?



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.