Next: Linking Phase, Previous: Compilation Phase, Up: Building with GPRbuild [Contents][Index]
The post-compilation phase has two parts: library building and program binding.
If there are libraries that need to be built or rebuilt, gprbuild will
call the library builder, specified by attribute Library_Builder
.
This is generally the tool gprlib, provided with GPRbuild. If gprbuild
can determine that a library is already up to date, then the library builder
will not be called.
If there are mains specified, and for these mains there are sources of languages with a binder driver (specified by attribute Binder’Driver (<language>), then the binder driver is called for each such main, but only if it needs to.
For Ada, the binder driver is normally gprbind, which will call
the appropriate version of gnatbind, that either the one in the same
directory as the Ada compiler or the fist one found on the path.
When neither of those is appropriate, it is possible to specify to
gprbind the full path of gnatbind, using the Binder switch
--gnatbind_path=
.
Example:
package Binder is for Switches ("Ada") use ("--gnatbind_path=/toto/gnatbind"); end Binder;
If gprbuild can determine that the artifacts from a previous post-compilation phase are already up to date, the binder driver is not called.
If there are no libraries and no binder drivers, then the post-compilation phase is empty.