Commit bd42db1f by Sergey Rybin Committed by Pierre-Marie de Rodat

[Ada] Document the '-U' option for gnatelim

2018-05-25  Sergey Rybin  <rybin@adacore.com>

gcc/ada/

	* doc/gnat_ugn/gnat_and_program_execution.rst: Add description of '-U'
	option for gnatelim.

From-SVN: r260735
parent 6459a31f
2018-05-25 Sergey Rybin <rybin@adacore.com>
* doc/gnat_ugn/gnat_and_program_execution.rst: Add description of '-U'
option for gnatelim.
2018-05-25 Ed Schonberg <schonberg@adacore.com> 2018-05-25 Ed Schonberg <schonberg@adacore.com>
* sem_ch6.adb (Analyze_Subprogram_Body_Helper): Do not create * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Do not create
......
...@@ -2700,7 +2700,7 @@ appropriate options. ...@@ -2700,7 +2700,7 @@ appropriate options.
``gnatelim`` is a project-aware tool. ``gnatelim`` is a project-aware tool.
(See :ref:`Using_Project_Files_with_GNAT_Tools` for a description of (See :ref:`Using_Project_Files_with_GNAT_Tools` for a description of
the project-related switches but note that ``gnatelim`` does not support the project-related switches but note that ``gnatelim`` does not support
the :samp:`-U`, :samp:`-U {main_unit}`, :samp:`--subdirs={dir}`, or the :samp:`-U {main_unit}`, :samp:`--subdirs={dir}`, or
:samp:`--no_objects_dir` switches.) :samp:`--no_objects_dir` switches.)
The project file package that can specify The project file package that can specify
``gnatelim`` switches is named ``Eliminate``. ``gnatelim`` switches is named ``Eliminate``.
...@@ -2730,6 +2730,10 @@ appropriate options. ...@@ -2730,6 +2730,10 @@ appropriate options.
treats these files as a complete set of sources making up a program to treats these files as a complete set of sources making up a program to
analyse, and analyses only these sources. analyse, and analyses only these sources.
If ``gnatelim`` is called with a project file and :samp:`-U` option is
used, then in process all the files from the argument project but
not just the closure of the main subprogram.
After a full successful build of the main subprogram ``gnatelim`` can be After a full successful build of the main subprogram ``gnatelim`` can be
called without specifying sources to analyse, in this case it computes called without specifying sources to analyse, in this case it computes
the source closure of the main unit from the :file:`ALI` files. the source closure of the main unit from the :file:`ALI` files.
...@@ -2814,6 +2818,15 @@ appropriate options. ...@@ -2814,6 +2818,15 @@ appropriate options.
equivalent ``gnatmake`` flag (:ref:`Switches_for_gnatmake`). equivalent ``gnatmake`` flag (:ref:`Switches_for_gnatmake`).
.. index:: -U (gnatelim)
:samp:`-U`
Process all the sources from the argument project. If no project file
is specified, this option has no effect. If this option is used with the
project file, ``gnatelim`` does not require the preliminary build of the
argument main subprogram.
.. index:: -files (gnatelim) .. index:: -files (gnatelim)
:samp:`-files={filename}` :samp:`-files={filename}`
...@@ -2924,6 +2937,12 @@ appropriate options. ...@@ -2924,6 +2937,12 @@ appropriate options.
your program from scratch after that, because you need a consistent your program from scratch after that, because you need a consistent
configuration file(s) during the entire compilation. configuration file(s) during the entire compilation.
If ``gnatelim`` is called with a project file and with ``-U`` option
the generated set of pragmas may contain pragmas for subprograms that
does not belong to the closure of the argument main subprogram. These
pragmas has no effect when the set of pragmas is used to reduce the size
of executable.
.. _Making_Your_Executables_Smaller: .. _Making_Your_Executables_Smaller:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment