aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/prj-conf.adb
diff options
context:
space:
mode:
authorArnaud Charlet <charlet@gcc.gnu.org>2009-06-23 11:57:45 +0200
committerArnaud Charlet <charlet@gcc.gnu.org>2009-06-23 11:57:45 +0200
commit1290ef1492d55f7131e4c7d15bfc4a2b5a7046e4 (patch)
tree63b071b08e39559bcd93745051792552ce1c32a4 /gcc/ada/prj-conf.adb
parentd6a24cdbbf6412c8b716a9dfddefb0b6796222b6 (diff)
downloadgcc-1290ef1492d55f7131e4c7d15bfc4a2b5a7046e4.zip
gcc-1290ef1492d55f7131e4c7d15bfc4a2b5a7046e4.tar.gz
gcc-1290ef1492d55f7131e4c7d15bfc4a2b5a7046e4.tar.bz2
[multiple changes]
2009-06-23 Emmanuel Briot <briot@adacore.com> * prj-proc.adb, prj-proc.ads, prj-nmsc.adb, prj-nmsc.ads, prj-conf.adb, prj-conf.ads (Check_Configuration): New parameter Compiler_Driver_Mandatory. 2009-06-23 Ed Schonberg <schonberg@adacore.com> * sem_ch10.adb (Analyze_With_Clause): If a subprogram instance in the context of the current unit has an inline pragma, the instance is not rewritten as the declaration of the package wrapper. Handle both possibilities when retrieving the visible subprogram that renames the instantiation itself. From-SVN: r148839
Diffstat (limited to 'gcc/ada/prj-conf.adb')
-rw-r--r--gcc/ada/prj-conf.adb41
1 files changed, 24 insertions, 17 deletions
diff --git a/gcc/ada/prj-conf.adb b/gcc/ada/prj-conf.adb
index 2591e6d..7c60f53 100644
--- a/gcc/ada/prj-conf.adb
+++ b/gcc/ada/prj-conf.adb
@@ -801,6 +801,7 @@ package body Prj.Conf is
begin
Free (Config_File_Path);
+ Config := No_Project;
if Config_File_Name /= "" then
Config_File_Path := Locate_Config_File (Config_File_Name);
@@ -830,28 +831,32 @@ package body Prj.Conf is
-- Parse the configuration file
- if Verbose_Mode then
+ if Verbose_Mode and then Config_File_Path /= null then
Write_Str ("Checking configuration ");
Write_Line (Config_File_Path.all);
end if;
- Prj.Part.Parse
- (In_Tree => Project_Node_Tree,
- Project => Config_Project_Node,
- Project_File_Name => Config_File_Path.all,
- Always_Errout_Finalize => False,
- Packages_To_Check => Packages_To_Check,
- Current_Directory => Current_Directory,
- Is_Config_File => True);
-
- if Config_Project_Node /= Empty_Node then
+ if Config_File_Path /= null then
+ Prj.Part.Parse
+ (In_Tree => Project_Node_Tree,
+ Project => Config_Project_Node,
+ Project_File_Name => Config_File_Path.all,
+ Always_Errout_Finalize => False,
+ Packages_To_Check => Packages_To_Check,
+ Current_Directory => Current_Directory,
+ Is_Config_File => True);
+ else
+ -- Maybe the user will want to create his own configuration file
+ Config_Project_Node := Empty_Node;
+ end if;
- if On_Load_Config /= null then
- On_Load_Config
- (Config_File => Config_Project_Node,
- Project_Node_Tree => Project_Node_Tree);
- end if;
+ if On_Load_Config /= null then
+ On_Load_Config
+ (Config_File => Config_Project_Node,
+ Project_Node_Tree => Project_Node_Tree);
+ end if;
+ if Config_Project_Node /= Empty_Node then
Prj.Proc.Process_Project_Tree_Phase_1
(In_Tree => Project_Tree,
Project => Config,
@@ -901,7 +906,8 @@ package body Prj.Conf is
Target_Name : String := "";
Normalized_Hostname : String;
Report_Error : Put_Line_Access := null;
- On_Load_Config : Config_File_Hook := null)
+ On_Load_Config : Config_File_Hook := null;
+ Compiler_Driver_Mandatory : Boolean := True)
is
Main_Config_Project : Project_Id;
Success : Boolean;
@@ -955,6 +961,7 @@ package body Prj.Conf is
Report_Error => Report_Error,
Current_Dir => Current_Directory,
When_No_Sources => Warning,
+ Compiler_Driver_Mandatory => Compiler_Driver_Mandatory,
Is_Config_File => False);
if not Success then