Next: , Previous: About gnatelim, Up: Reducing Size of Ada Executables with gnatelim


7.3.2 Running gnatelim

gnatelim has the following command-line interface:

     $ gnatelim [switches] -main=main_unit_name {filename} [-cargs gcc_switches]

main_unit_name should be a name of a source file that contains the main subprogram of a program (partition).

Each filename is the name (including the extension) of a source file to process. “Wildcards” are allowed, and the file name may contain path information.

gcc_switches’ is a list of switches for gcc. They will be passed on to all compiler invocations made by gnatelim to generate the ASIS trees. Here you can provide -I switches to form the source search path, use the -gnatec switch to set the configuration file, use the -gnat05 switch if sources should be compiled in Ada 2005 mode etc.

gnatelim has the following switches:

-files=filename
Take the argument source files from the specified file. This file should be an ordinary text file containing file names separated by spaces or line breaks. You can use this switch more than once in the same call to gnatelim. You also can combine this switch with an explicit list of files.
-log
Duplicate all the output sent to stderr into a log file. The log file is named gnatelim.log and is located in the current directory.
-log=filename
Duplicate all the output sent to stderr into a specified log file.


--no-elim-dispatch
Do not generate pragmas for dispatching operations.
--ignore=filename
Do not generate pragmas for subprograms declared in the sources listed in a specified file


-o=report_file
Put gnatelim output into a specified file. If this file already exists, it is overridden. If this switch is not used, gnatelim outputs its results into stderr
-q
Quiet mode: by default gnatelim outputs to the standard error stream the number of program units left to be processed. This option turns this trace off.


-t
Print out execution time.
-v
Verbose mode: gnatelim version information is printed as Ada comments to the standard output stream. Also, in addition to the number of program units left gnatelim will output the name of the current unit being processed.
-wq
Quiet warning mode - some warnings are suppressed. In particular warnings that indicate that the analysed set of sources is incomplete to make up a partition and that some subprogram bodies are missing are not generated.

Note: to invoke gnatelim with a project file, use the gnat driver (see The GNAT Driver and Project Files).