Skip to content

Consider build generation (e.g. ninja) #11

Open
@calebzulawski

Description

@calebzulawski

This doesn't solve one particular problem, but has a variety of benefits (and a few drawbacks)

Benefits

  • using a "mainstream" build tool
    • less maintenance/development
    • get all of the features of ninja (target dumping, graph visualization, output purging, compile commands) for "free"
    • integrate better with some inflexible tooling (e.g. Coverity) more easily
  • two stage build (configure-build)
    • faster edit-compile-run loops: ninja is optimized for a particular type of graph and is much faster than ergo
    • an explicit two stage build can be simpler than ad hoc/lazy, e.g. external dependency tracking/vendoring done in the configure step
  • works around various current bugs or ergo limitations

Drawbacks/Unanswered Questions

  • build recipe regeneration
    • should all targets be configured/enumerated up front? should modules be split across ninja files to minimize changes?
  • files are only tracked by timestamp
    • doesn't play nice with git branching, or reverting changes
    • solved by using ccache or sccache (sccache does much more than ergo's simple local build caching)
  • how to deal with "custom" modules? (e.g. external dependencies, code generation)
    • modules could contain a configure step (ergo code executed the first time the target is requested) and a command step (written in, or generates, ninja build rules)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions