[Ada] Simultaneous compilations and -gnateG

Message ID 20101004131713.GA17826@adacore.com
State New
Headers show

Commit Message

Arnaud Charlet Oct. 4, 2010, 1:17 p.m.
When there are several simultaneous compilations, the compilation switch
-gnateG (generate preprocessed source) is used and the same preprocessed
source is necessary for several of these simultaneous compilation, one
or several compilations may fail. This patch makes sure that no
compilation will fail for the reason that the processed file cannot be
saved to disk.
The test for this is to invoke gnatmake with -f -j20 -gnateD... -gnateG
a main that withs many package spec that in turn with the same spec
that needs to be preprocessed. There should not be any compilation
failure if the same invocation of gnatmake succeeds without the -j

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

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

	* sinput-l.adb (Load_File): Do not fail when switch -gnateG is
	specified and the processed file cannot be written. Just issue a
	warning and continue.


Index: sinput-l.adb
--- sinput-l.adb	(revision 164906)
+++ sinput-l.adb	(working copy)
@@ -591,10 +591,9 @@  package body Sinput.L is
                         if not Status then
-                             ("could not write processed file """ &
+                             ("?could not write processed file """ &
                               Name_Buffer (1 .. Name_Len) & '"',
-                           return No_Source_File;
                         end if;
                   end if;