Patchwork [Ada] Allow shared libraries to import any projects for some tools

login
register
mail settings
Submitter Arnaud Charlet
Date Oct. 11, 2010, 10:17 a.m.
Message ID <20101011101710.GA20631@adacore.com>
Download mbox | patch
Permalink /patch/67404/
State New
Headers show

Comments

Arnaud Charlet - Oct. 11, 2010, 10:17 a.m.
For all tools except gnatmake, it is now allowed to have a shared
library project that import a project that is not a shared library
project.
The test for this is to build such a project tree and to invoke "gnat ls"
on such a tree.

Tested on x86_64-pc-linux-gnu, committed on trunk

2010-10-11  Vincent Celier  <celier@adacore.com>

	* gnatcmd.adb (GNATCmd): For all tools other than gnatmake, allow
	shared library projects to import projects that are not shared library
	projects.

Patch

Index: gnatcmd.adb
===================================================================
--- gnatcmd.adb	(revision 165256)
+++ gnatcmd.adb	(working copy)
@@ -1577,6 +1577,13 @@  begin
            Program_Name (Command_List (The_Command).Unixcmd.all, "gnat");
       end if;
 
+      --  For all tools other than gnatmake, allow shared library projects to
+      --  import projects that are not shared library projects.
+
+      if The_Command /= Make then
+         Opt.Unchecked_Shared_Lib_Imports := True;
+      end if;
+
       --  Locate the executable for the command
 
       Exec_Path := Locate_Exec_On_Path (Program.all);