PRUNERS / FLiT

A project to quickly detect discrepancies in floating point computation across hardware, compilers, libraries and software.
Other
36 stars 6 forks source link

Issue302 ninja build #303

Closed mikebentley15 closed 4 years ago

mikebentley15 commented 4 years ago

Fixes #302

Description: Added support for generating a Ninja build file, build.ninja, instead of the autogenerated Makefile. This generator creates a much larger build file, but it is much simpler, flattened out, and much faster to execute (try make help versus ninja help on a large project to see the difference).

It is unclear if the benefits are worth the effort.

It is not a first-class feature, this has been put as an "experimental" feature. To this end, a new flit subcommand has been implemented, flit experimental which gives access to experimental features not ready for prime-time. This feature has been put there and is accessible with flit experimental ninja.

This new feature makes use of the ninja_syntax python module provided by the Ninja build project. So as to not require a new optional external dependency, I simply copied this one file, ninja_syntax.py into the experimental folder in the FLiT source tree.

Documentation: I've added documentation for the experimental subcommand and a new page describing each experimental feature. This has been fully documented, including the documentation that experimental features are not guaranteed to stay around.

Tests: Only docstring tests have been added to the new experimental/flit_ninja.py file. The testing is not complete and would need to be completed if this feature were to exit the experimental folder and become part of flit_update.py.

mikebentley15 commented 4 years ago

Let's wait until pull request #301 is completed before merging this in since this is built upon those changes.