creachadair / imath

Arbitrary precision integer and rational arithmetic library
Other
131 stars 20 forks source link

Improve build automation #28

Open creachadair opened 5 years ago

creachadair commented 5 years ago

Right now the project is built with make. However, the current build setup has several unfortunate properties, including:

  1. It uses ambient toolchains,
  2. It hard-codes various GCC-specific compiler flags, some of which drift by version,
  3. It doesn't readily support cross-compilation and cross-testing.

Some of these things could be fixed by rewriting (and modernizing) the Makefile, but I actually think Make is the wrong tool. On the other hand, I also believe it's important for the library to be easily pulled out and hacked up into a new build environment, without deep connections to the environment I use to develop it. On that basis, I will probably not consider using Bazel.

One option is to build everything in Docker (see commit 899e202e for a nod in that general direction). That would let us keep the Make-based build but use containerization to ensure a stable build environment. Another option is djb redo, which has a recent decent reimplementation here.