Skip to content

cbiffle/cobble-build

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

67 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Cobble: a simple build system for modular software.

Cobble is a build system designed primarily for complex embedded software builds, implemented in about 1000 lines of Python.

Cobble is designed to be flexible enough to build most systems Make can, and has successfully replaced Make in several projects, though your mileage may vary, since no two Make builds are alike.

Cobble builds are...

  • Modular. Software is arranged into packages, each containing a portion of the build instructions. This ensures that you can reason locally about a library and its build recipe, and split common components out into e.g. Git submodules without having to copy-paste the build recipe.

  • Parameterized. A single build target can describe multiple actual build products, depending on (for example) the architecture of the program that depends on it, or whatever other context information you desire.

  • Incremental. Cobble puts a lot of work (and most of its code) into describing build dependencies correctly, so that incremental builds are fast and correct. Even if you change fundamental parameters of the build (like CPU architecture or CFLAGS) you don't need to clean before recompiling.

  • Parallel. Cobble aggressively finds opportunities for parallelism in your build graph and chews through tasks using as many CPUs as you can give it, thanks to using Ninja under the hood.

  • Extensible. Cobble itself ships with a plugin for describing how to build C code. Projects can add their own plugins as needed. (As of Cobble2, writing a plugin is even pretty easy.)

  • Flexible. Cobble BUILD files are Python programs that can do arbitrary computation to compute the build graph (though not during the build). While the system nudges you toward deterministic repeatable builds, if you need to do something weird, we won't stop you.

Cobble is built on the shoulders of others:

  • Ninja does all the hard work behind the scenes.
  • The build model was originally dreamed up by Anton Staaf in his Make-based build system.
  • Aspects of the design are influenced by SCons, GYP, and GN.

v1 and v2

You're reading the readme for the second version of Cobble. Cobble v2 is mostly compatible but there have been some changes to allow bugfixes and simplifications in the core. If you need the older version, have a look at the v1 branch.

About

A simple build system for modular software.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages