Commit aa0df10b by Vincent Celier Committed by Arnaud Charlet

gnat_ugn.texi: Add documentation for new gnatmake switch --create-map-file.

2010-09-09  Vincent Celier  <celier@adacore.com>

	* gnat_ugn.texi: Add documentation for new gnatmake switch
	--create-map-file.
	* make.adb (Map_File): New global variable to store the value of switch
	--create-map-file.
	(Gnatmake): Add switch -M to gnatlink if buider switch --create-map-file
	has been specified.
	(Scan_Make_Arg): Recognize switch --create-map-file
	* makeutl.ads (Create_Map_File_Switch): New constant string for new
	gnatmake and gprbuild switch --create-map-file.

From-SVN: r164104
parent 79c3dc5f
2010-09-09 Vincent Celier <celier@adacore.com>
* gnat_ugn.texi: Add documentation for new gnatmake switch
--create-map-file.
* make.adb (Map_File): New global variable to store the value of switch
--create-map-file.
(Gnatmake): Add switch -M to gnatlink if buider switch --create-map-file
has been specified.
(Scan_Make_Arg): Recognize switch --create-map-file
* makeutl.ads (Create_Map_File_Switch): New constant string for new
gnatmake and gprbuild switch --create-map-file.
2010-09-09 Robert Dewar <dewar@adacore.com>
* sinput-p.ads: Minor comment update.
......
......@@ -1778,8 +1778,8 @@ of the compiler (@pxref{Character Set Control}).
@noindent
The basic character set is Latin-1. This character set is defined by ISO
standard 8859, part 1. The lower half (character codes @code{16#00#}
@dots{} @code{16#7F#)} is identical to standard ASCII coding, but the upper half
is used to represent additional characters. These include extended letters
@dots{} @code{16#7F#)} is identical to standard ASCII coding, but the upper
half is used to represent additional characters. These include extended letters
used by European languages, such as French accents, the vowels with umlauts
used in German, and the extra letter A-ring used in Swedish.
......@@ -3823,7 +3823,8 @@ compiled.
@cindex cannot generate code
If you attempt to compile any of these files, you will get one of the
following error messages (where @var{fff} is the name of the file you compiled):
following error messages (where @var{fff} is the name of the file you
compiled):
@smallexample
cannot generate code for file @var{fff} (package spec)
......@@ -9253,6 +9254,17 @@ By default, shared library projects are not allowed to import static library
projects. When this switch is used on the command line, this restriction is
relaxed.
@ifclear vms
@item --create-map-file
When linking an executable, create a map file. The name of the map file
has the same name as the executable with extension ".map".
@item --create-map-file=mapfile
When linking an executable, create a map file. The name of the map file is
"mapfile".
@end ifclear
@item ^-a^/ALL_FILES^
@cindex @option{^-a^/ALL_FILES^} (@command{gnatmake})
Consider all files in the make process, even the GNAT internal system
......@@ -18647,9 +18659,9 @@ gnatmake -f -pg -P my_project
@end smallexample
@noindent
Note that only the objects that were compiled with the @samp{-pg} switch will be
profiled; if you need to profile your whole project, use the
@samp{-f} gnatmake switch to force full recompilation.
Note that only the objects that were compiled with the @samp{-pg} switch will
be profiled; if you need to profile your whole project, use the @samp{-f}
gnatmake switch to force full recompilation.
@node Program execution
@subsection Program execution
......@@ -24879,8 +24891,8 @@ Note that in this approach, both declarations are analyzed by the
compiler so this can only be used where both declarations are legal,
even though one of them will not be used.
Another approach is to define integer constants, e.g.@: @code{Bits_Per_Word}, or
Boolean constants, e.g.@: @code{Little_Endian}, and then write declarations
Another approach is to define integer constants, e.g.@: @code{Bits_Per_Word},
or Boolean constants, e.g.@: @code{Little_Endian}, and then write declarations
that are parameterized by these constants. For example
@smallexample @c ada
......
......@@ -353,6 +353,9 @@ package body Make is
-- calling Change_Dir if the current working directory is already this
-- directory.
Map_File : String_Access := null;
-- Value of switch --create-map-file
-- Packages of project files where unknown attributes are errors
Naming_String : aliased String := "naming";
......@@ -6254,6 +6257,15 @@ package body Make is
end;
end if;
-- Add switch -M to gnatlink if buider switch --create-map-file
-- has been specified.
if Map_File /= null then
Linker_Switches.Increment_Last;
Linker_Switches.Table (Linker_Switches.Last) :=
new String'("-M" & Map_File.all);
end if;
declare
Args : Argument_List
(Linker_Switches.First .. Linker_Switches.Last + 2);
......@@ -8121,6 +8133,19 @@ package body Make is
Add_Switch (Argv, Compiler, And_Save => And_Save);
Add_Switch (Argv, Linker, And_Save => And_Save);
elsif Argv = Create_Map_File_Switch then
Map_File := new String'("");
elsif Argv'Length > Create_Map_File_Switch'Length + 1
and then
Argv (1 .. Create_Map_File_Switch'Length) = Create_Map_File_Switch
and then
Argv (Create_Map_File_Switch'Length + 1) = '='
then
Map_File :=
new String'
(Argv (Create_Map_File_Switch'Length + 2 .. Argv'Last));
else
Scan_Make_Switches (Project_Node_Tree, Argv, Success);
end if;
......
......@@ -57,6 +57,9 @@ package Makeutl is
-- Switch to forbid simultaneous compilations for the same object directory
-- when project files are used.
Create_Map_File_Switch : constant String := "--create-map-file";
-- Switch to create a map file when an executable is linked
procedure Add
(Option : String_Access;
To : in out String_List_Access;
......
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