Commit b3af75af by Vincent Celier Committed by Arnaud Charlet

prj-attr.adb: Add new project level attribute Map_File_Option

2008-05-27  Vincent Celier  <celier@adacore.com>

	* prj-attr.adb: Add new project level attribute Map_File_Option
	
	* prj-nmsc.adb (Process_Linker): Process new attribute Map_File_Option
	
	* prj.ads: Minor reformatting and comment update
	(Project_Configuration): New component Map_File_Option
	
	* snames.adb: New standard name Map_File_Option
	
	* snames.ads: New standard name Map_File_Option

From-SVN: r135981
parent eca5286b
...@@ -231,6 +231,7 @@ package body Prj.Attr is ...@@ -231,6 +231,7 @@ package body Prj.Attr is
"Ladefault_switches#" & "Ladefault_switches#" &
"Lcswitches#" & "Lcswitches#" &
"LVlinker_options#" & "LVlinker_options#" &
"SVmap_file_option#" &
-- Configuration - Linking -- Configuration - Linking
......
...@@ -1831,9 +1831,7 @@ package body Prj.Nmsc is ...@@ -1831,9 +1831,7 @@ package body Prj.Nmsc is
Data.Config.Linker := Data.Config.Linker :=
Path_Name_Type (Attribute.Value.Value); Path_Name_Type (Attribute.Value.Value);
elsif elsif Attribute.Name = Name_Required_Switches then
Attribute.Name = Name_Required_Switches
then
-- Attribute Required_Switches: the minimum -- Attribute Required_Switches: the minimum
-- options to use when invoking the linker -- options to use when invoking the linker
...@@ -1843,6 +1841,8 @@ package body Prj.Nmsc is ...@@ -1843,6 +1841,8 @@ package body Prj.Nmsc is
From_List => Attribute.Value.Values, From_List => Attribute.Value.Values,
In_Tree => In_Tree); In_Tree => In_Tree);
elsif Attribute.Name = Name_Map_File_Option then
Data.Config.Map_File_Option := Attribute.Value.Value;
end if; end if;
end if; end if;
...@@ -3854,8 +3854,8 @@ package body Prj.Nmsc is ...@@ -3854,8 +3854,8 @@ package body Prj.Nmsc is
Error_Msg Error_Msg
(Project, In_Tree, (Project, In_Tree,
Continuation.all & Continuation.all &
"library project %% cannot extend project %% " & "shared library project %% cannot extend " &
"that is not a library project", "project %% that is not a library project",
Data.Location); Data.Location);
Continuation := Continuation_String'Access; Continuation := Continuation_String'Access;
......
...@@ -1125,104 +1125,106 @@ package Prj is ...@@ -1125,104 +1125,106 @@ package Prj is
-- The table that contains the lists of project files -- The table that contains the lists of project files
type Project_Configuration is record type Project_Configuration is record
Run_Path_Option : Name_List_Index := No_Name_List; Run_Path_Option : Name_List_Index := No_Name_List;
-- The option to use when linking to specify the path where to look -- The option to use when linking to specify the path where to look for
-- for libraries. -- libraries.
Executable_Suffix : Name_Id := No_Name; Executable_Suffix : Name_Id := No_Name;
-- The suffix of executables, when specified in the configuration -- The suffix of executables, when specified in the configuration or in
-- or in package Builder of the main project. When this is not -- package Builder of the main project. When this is not specified, the
-- specified, the executable suffix is the default for the platform. -- executable suffix is the default for the platform.
-- Linking -- Linking
Linker : Path_Name_Type := No_Path; Linker : Path_Name_Type := No_Path;
-- Path name of the linker driver. Specified in the configuration -- Path name of the linker driver. Specified in the configuration or in
-- or in the package Builder of the main project. -- the package Builder of the main project.
Minimum_Linker_Options : Name_List_Index := No_Name_List; Map_File_Option : Name_Id := No_Name;
-- The minimum options for the linker driver. Specified in the -- Option to use when invoking the linker to build a map file
-- configuration.
Linker_Executable_Option : Name_List_Index := No_Name_List; Minimum_Linker_Options : Name_List_Index := No_Name_List;
-- The option(s) to indicate the name of the executable in the -- The minimum options for the linker driver. Specified in the
-- linker command. Specified in the configuration. When not -- configuration.
-- specified, default to -o <executable name>.
Linker_Lib_Dir_Option : Name_Id := No_Name; Linker_Executable_Option : Name_List_Index := No_Name_List;
-- The option to specify where to find a library for linking. -- The option(s) to indicate the name of the executable in the linker
-- Specified in the configuration. When not specified, defaults to -- command. Specified in the configuration. When not specified, default
-- "-L". -- to -o <executable name>.
Linker_Lib_Name_Option : Name_Id := No_Name; Linker_Lib_Dir_Option : Name_Id := No_Name;
-- The option to specify the name of a library for linking. Specified -- The option to specify where to find a library for linking. Specified
-- in the configuration. When not specified, defaults to "-l". -- in the configuration. When not specified, defaults to "-L".
-- Libraries Linker_Lib_Name_Option : Name_Id := No_Name;
-- The option to specify the name of a library for linking. Specified in
-- the configuration. When not specified, defaults to "-l".
Library_Builder : Path_Name_Type := No_Path; -- Libraries
-- The executable to build library (specified in the configuration)
Lib_Support : Library_Support := None; Library_Builder : Path_Name_Type := No_Path;
-- The level of library support. Specified in the configuration. -- The executable to build library (specified in the configuration)
-- Support is none, static libraries only or both static and shared
-- libraries.
-- Archives Lib_Support : Library_Support := None;
-- The level of library support. Specified in the configuration. Support
-- is none, static libraries only or both static and shared libraries.
Archive_Builder : Name_List_Index := No_Name_List; Archive_Builder : Name_List_Index := No_Name_List;
-- The name of the executable to build archives, with the minimum -- The name of the executable to build archives, with the minimum
-- switches. Specified in the configuration. -- switches. Specified in the configuration.
Archive_Builder_Append_Option : Name_List_Index := No_Name_List; Archive_Builder_Append_Option : Name_List_Index := No_Name_List;
-- The options to append object files to an archive -- The options to append object files to an archive
Archive_Indexer : Name_List_Index := No_Name_List; Archive_Indexer : Name_List_Index := No_Name_List;
-- The name of the executable to index archives, with the minimum -- The name of the executable to index archives, with the minimum
-- switches. Specified in the configuration. -- switches. Specified in the configuration.
Archive_Suffix : File_Name_Type := No_File; Archive_Suffix : File_Name_Type := No_File;
-- The suffix of archives. Specified in the configuration. When not -- The suffix of archives. Specified in the configuration. When not
-- specified, defaults to ".a". -- specified, defaults to ".a".
Lib_Partial_Linker : Name_List_Index := No_Name_List; Lib_Partial_Linker : Name_List_Index := No_Name_List;
-- Shared libraries -- Shared libraries
Shared_Lib_Driver : File_Name_Type := No_File; Shared_Lib_Driver : File_Name_Type := No_File;
-- The driver to link shared libraries. Set with attribute -- The driver to link shared libraries. Set with attribute Library_GCC.
-- Library_GCC. Default to gcc. -- Default to gcc.
Shared_Lib_Prefix : File_Name_Type := No_File; Shared_Lib_Prefix : File_Name_Type := No_File;
-- Part of a shared library file name that precedes the name of the -- Part of a shared library file name that precedes the name of the
-- library. Specified in the configuration. When not specified, -- library. Specified in the configuration. When not specified, defaults
-- defaults to "lib". -- to "lib".
Shared_Lib_Suffix : File_Name_Type := No_File; Shared_Lib_Suffix : File_Name_Type := No_File;
-- Suffix of shared libraries, after the library name in the shared -- Suffix of shared libraries, after the library name in the shared
-- library name. Specified in the configuration. When not specified, -- library name. Specified in the configuration. When not specified,
-- default to ".so". -- default to ".so".
Shared_Lib_Min_Options : Name_List_Index := No_Name_List; Shared_Lib_Min_Options : Name_List_Index := No_Name_List;
-- Comment ??? -- The minimum options to use when building a shared library
Lib_Version_Options : Name_List_Index := No_Name_List; Lib_Version_Options : Name_List_Index := No_Name_List;
-- Comment ??? -- The options to use to specify a library version
Symbolic_Link_Supported : Boolean := False; Symbolic_Link_Supported : Boolean := False;
-- Comment ??? -- True if the platform supports symbolic link files
Lib_Maj_Min_Id_Supported : Boolean := False; Lib_Maj_Min_Id_Supported : Boolean := False;
-- Comment ??? -- True if platform supports library major and minor options, such as
-- libname.so -> libname.so.2 -> libname.so.2.4
Auto_Init_Supported : Boolean := False; Auto_Init_Supported : Boolean := False;
-- Comment ??? -- True if automatic initialisation is supported for shared stand-alone
-- libraries.
end record; end record;
Default_Project_Config : constant Project_Configuration := Default_Project_Config : constant Project_Configuration :=
(Run_Path_Option => No_Name_List, (Run_Path_Option => No_Name_List,
Executable_Suffix => No_Name, Executable_Suffix => No_Name,
Linker => No_Path, Linker => No_Path,
Map_File_Option => No_Name,
Minimum_Linker_Options => No_Name_List, Minimum_Linker_Options => No_Name_List,
Linker_Executable_Option => No_Name_List, Linker_Executable_Option => No_Name_List,
Linker_Lib_Dir_Option => No_Name, Linker_Lib_Dir_Option => No_Name,
......
...@@ -767,6 +767,7 @@ package body Snames is ...@@ -767,6 +767,7 @@ package body Snames is
"local_config_file#" & "local_config_file#" &
"local_configuration_pragmas#" & "local_configuration_pragmas#" &
"locally_removed_files#" & "locally_removed_files#" &
"map_file_option#" &
"mapping_file_switches#" & "mapping_file_switches#" &
"mapping_spec_suffix#" & "mapping_spec_suffix#" &
"mapping_body_suffix#" & "mapping_body_suffix#" &
......
...@@ -1088,63 +1088,64 @@ package Snames is ...@@ -1088,63 +1088,64 @@ package Snames is
Name_Local_Config_File : constant Name_Id := N + 706; Name_Local_Config_File : constant Name_Id := N + 706;
Name_Local_Configuration_Pragmas : constant Name_Id := N + 707; Name_Local_Configuration_Pragmas : constant Name_Id := N + 707;
Name_Locally_Removed_Files : constant Name_Id := N + 708; Name_Locally_Removed_Files : constant Name_Id := N + 708;
Name_Mapping_File_Switches : constant Name_Id := N + 709; Name_Map_File_Option : constant Name_Id := N + 709;
Name_Mapping_Spec_Suffix : constant Name_Id := N + 710; Name_Mapping_File_Switches : constant Name_Id := N + 710;
Name_Mapping_Body_Suffix : constant Name_Id := N + 711; Name_Mapping_Spec_Suffix : constant Name_Id := N + 711;
Name_Metrics : constant Name_Id := N + 712; Name_Mapping_Body_Suffix : constant Name_Id := N + 712;
Name_Naming : constant Name_Id := N + 713; Name_Metrics : constant Name_Id := N + 713;
Name_Object_Generated : constant Name_Id := N + 714; Name_Naming : constant Name_Id := N + 714;
Name_Objects_Linked : constant Name_Id := N + 715; Name_Object_Generated : constant Name_Id := N + 715;
Name_Objects_Path : constant Name_Id := N + 716; Name_Objects_Linked : constant Name_Id := N + 716;
Name_Objects_Path_File : constant Name_Id := N + 717; Name_Objects_Path : constant Name_Id := N + 717;
Name_Object_Dir : constant Name_Id := N + 718; Name_Objects_Path_File : constant Name_Id := N + 718;
Name_Pic_Option : constant Name_Id := N + 719; Name_Object_Dir : constant Name_Id := N + 719;
Name_Pretty_Printer : constant Name_Id := N + 720; Name_Pic_Option : constant Name_Id := N + 720;
Name_Prefix : constant Name_Id := N + 721; Name_Pretty_Printer : constant Name_Id := N + 721;
Name_Project : constant Name_Id := N + 722; Name_Prefix : constant Name_Id := N + 722;
Name_Roots : constant Name_Id := N + 723; Name_Project : constant Name_Id := N + 723;
Name_Required_Switches : constant Name_Id := N + 724; Name_Roots : constant Name_Id := N + 724;
Name_Run_Path_Option : constant Name_Id := N + 725; Name_Required_Switches : constant Name_Id := N + 725;
Name_Runtime_Project : constant Name_Id := N + 726; Name_Run_Path_Option : constant Name_Id := N + 726;
Name_Shared_Library_Minimum_Switches : constant Name_Id := N + 727; Name_Runtime_Project : constant Name_Id := N + 727;
Name_Shared_Library_Prefix : constant Name_Id := N + 728; Name_Shared_Library_Minimum_Switches : constant Name_Id := N + 728;
Name_Shared_Library_Suffix : constant Name_Id := N + 729; Name_Shared_Library_Prefix : constant Name_Id := N + 729;
Name_Separate_Suffix : constant Name_Id := N + 730; Name_Shared_Library_Suffix : constant Name_Id := N + 730;
Name_Source_Dirs : constant Name_Id := N + 731; Name_Separate_Suffix : constant Name_Id := N + 731;
Name_Source_Files : constant Name_Id := N + 732; Name_Source_Dirs : constant Name_Id := N + 732;
Name_Source_List_File : constant Name_Id := N + 733; Name_Source_Files : constant Name_Id := N + 733;
Name_Spec : constant Name_Id := N + 734; Name_Source_List_File : constant Name_Id := N + 734;
Name_Spec_Suffix : constant Name_Id := N + 735; Name_Spec : constant Name_Id := N + 735;
Name_Specification : constant Name_Id := N + 736; Name_Spec_Suffix : constant Name_Id := N + 736;
Name_Specification_Exceptions : constant Name_Id := N + 737; Name_Specification : constant Name_Id := N + 737;
Name_Specification_Suffix : constant Name_Id := N + 738; Name_Specification_Exceptions : constant Name_Id := N + 738;
Name_Stack : constant Name_Id := N + 739; Name_Specification_Suffix : constant Name_Id := N + 739;
Name_Switches : constant Name_Id := N + 740; Name_Stack : constant Name_Id := N + 740;
Name_Symbolic_Link_Supported : constant Name_Id := N + 741; Name_Switches : constant Name_Id := N + 741;
Name_Sync : constant Name_Id := N + 742; Name_Symbolic_Link_Supported : constant Name_Id := N + 742;
Name_Synchronize : constant Name_Id := N + 743; Name_Sync : constant Name_Id := N + 743;
Name_Toolchain_Description : constant Name_Id := N + 744; Name_Synchronize : constant Name_Id := N + 744;
Name_Toolchain_Version : constant Name_Id := N + 745; Name_Toolchain_Description : constant Name_Id := N + 745;
Name_Runtime_Library_Dir : constant Name_Id := N + 746; Name_Toolchain_Version : constant Name_Id := N + 746;
Name_Runtime_Library_Dir : constant Name_Id := N + 747;
-- Other miscellaneous names used in front end -- Other miscellaneous names used in front end
Name_Unaligned_Valid : constant Name_Id := N + 747; Name_Unaligned_Valid : constant Name_Id := N + 748;
-- Ada 2005 reserved words -- Ada 2005 reserved words
First_2005_Reserved_Word : constant Name_Id := N + 748; First_2005_Reserved_Word : constant Name_Id := N + 749;
Name_Interface : constant Name_Id := N + 748; Name_Interface : constant Name_Id := N + 749;
Name_Overriding : constant Name_Id := N + 749; Name_Overriding : constant Name_Id := N + 750;
Name_Synchronized : constant Name_Id := N + 750; Name_Synchronized : constant Name_Id := N + 751;
Last_2005_Reserved_Word : constant Name_Id := N + 750; Last_2005_Reserved_Word : constant Name_Id := N + 751;
subtype Ada_2005_Reserved_Words is subtype Ada_2005_Reserved_Words is
Name_Id range First_2005_Reserved_Word .. Last_2005_Reserved_Word; Name_Id range First_2005_Reserved_Word .. Last_2005_Reserved_Word;
-- Mark last defined name for consistency check in Snames body -- Mark last defined name for consistency check in Snames body
Last_Predefined_Name : constant Name_Id := N + 750; Last_Predefined_Name : constant Name_Id := N + 751;
--------------------------------------- ---------------------------------------
-- Subtypes Defining Name Categories -- -- Subtypes Defining Name Categories --
......
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