aura compile [-no-pic] [-debug] [-assertions] [-optimize-(1/2/3/size/debug)]
compile command compiles all object code for all units within the project. On subsequent invocations of
compile after an invocation of clean,
compile only re-compiles units that need to be recompiled, based on any changes to the project sources. The AURA CLI does this intelligently by combining the full unit dependency maps with Ada separate compilation semantics.
Compile implicitly invokes checkout
Compile does not invoke the binder, nor does it link the final executable.
By default, the AURA CLI compiles all units into Position-Independent Code (PIC). This option overrides this behavior.
This instructs the compiler to make object code that contains extra debugging symbols. It is typically unadvisable to apply any optimization when using this option, except for -optimize-debug.
This instructs the Ada compiler to enable all assertions in the Ada code. This typically activate checking for all Ada contracts such as
pragma assert, pre- and post-conditions, and subtype predicates.
Enables the standard compiler optimization levels. These correspond directly with the compiler’s optimization options.
Enabling all assertions via a compiler option is not behaviour specified by the Ada standard. Since AURA CLI is simply a compiler driver, it cannot enforce exactly which assertions are forced on with the -assertions flag.
For assertions that are intended to be used in production, please use Ada’s
pragma Assertions, which does have specified behavior. The -assertions option is intended for testing phases of development.
When driving GCC (GNAT), -assertions causes the -gnata option to be passed to gcc.
Compile is particularly useful during the typical phase of Ada development when the compiler finding all of your thousands of mistakes. The AURA CLI provides clearly formatted output from the units that failed to compile. The intelligent recompilation feature together with the highly parallelized design of the AURA reference implementation, this can be much quicker than more traditional approaches. When needing to re-attempt a compilation many dozens of times, this can make a big difference.