The GNAT compilation model

One of the novel features of GNAT is its unusual approach to the compilation process and the handling of the Ada library. The words novel and unusual only apply from a traditional Ada compilation perspective. By contrast, a typical C or C++ programmer would find many aspects of the model quite familiar. In GNAT, sources are independently compiled to produce a set of objects, and the set of object files thus produced is submitted to the binder/linker to generate the resulting executable. This approach removes all order-of-compilation considerations, and eliminates the traditional monolithic library structure. Not only is the model very simple to understand, but it makes it easier to build hybrid systems in multiple languages, and is much more compatible with conventional configuration management tools (ranging from the simple Unix MAKE program to sophisticated compilation management environments) than the conventional library structure. Needless to say, the approach we present is fully compatible with the Ada rules of compilation.