From bd42db1f3ae2e01d8d69237b07e69b3e104d43ee Mon Sep 17 00:00:00 2001 From: Sergey Rybin Date: Fri, 25 May 2018 09:04:47 +0000 Subject: [PATCH] [Ada] Document the '-U' option for gnatelim 2018-05-25 Sergey Rybin gcc/ada/ * doc/gnat_ugn/gnat_and_program_execution.rst: Add description of '-U' option for gnatelim. From-SVN: r260735 --- gcc/ada/ChangeLog | 5 +++++ .../gnat_ugn/gnat_and_program_execution.rst | 21 ++++++++++++++++++- 2 files changed, 25 insertions(+), 1 deletion(-) diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index 904194e5ebb..d284f18f1c5 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,8 @@ +2018-05-25 Sergey Rybin + + * doc/gnat_ugn/gnat_and_program_execution.rst: Add description of '-U' + option for gnatelim. + 2018-05-25 Ed Schonberg * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Do not create diff --git a/gcc/ada/doc/gnat_ugn/gnat_and_program_execution.rst b/gcc/ada/doc/gnat_ugn/gnat_and_program_execution.rst index 6ce22f4a01e..8f6d338421b 100644 --- a/gcc/ada/doc/gnat_ugn/gnat_and_program_execution.rst +++ b/gcc/ada/doc/gnat_ugn/gnat_and_program_execution.rst @@ -2700,7 +2700,7 @@ appropriate options. ``gnatelim`` is a project-aware tool. (See :ref:`Using_Project_Files_with_GNAT_Tools` for a description of 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.) The project file package that can specify ``gnatelim`` switches is named ``Eliminate``. @@ -2730,6 +2730,10 @@ appropriate options. treats these files as a complete set of sources making up a program to 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 called without specifying sources to analyse, in this case it computes the source closure of the main unit from the :file:`ALI` files. @@ -2814,6 +2818,15 @@ appropriate options. 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) :samp:`-files={filename}` @@ -2924,6 +2937,12 @@ appropriate options. your program from scratch after that, because you need a consistent 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: -- 2.30.2