This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Ada] Simultaneous compilations and -gnateG


When -gnateG is used, the preprocessed files will be written only for the
sources of the main unit (spec, body and subunits) that is compiled.
This will avoid simultaneous attempt to write the same preprocessed file
when there are simultaneous compilations.
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 warning that a
preprocessed file cannot be written.

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

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

	* frontend.adb: Set Lib.Parsing_Main_Extended_Source to True before
	loading the main source, so that if it is preprocessed and -gnateG is
	used, the preprocessed file is written.
	* lib.ads (Analysing_Subunit_Of_Main): New global variable to indicate
	if a subunit is from the main unit when it is loaded.
	* sem_ch10.adb (Analyze_Proper_Body): Set Lib.Analysing_Subunit_Of_Main
	to True before loading a subunit.
	* sem_ch12.adb (Copy_Generic_Node): Set Lib.Analysing_Subunit_Of_Main
	to True when the main is a generic unit before loading one of its
	subunits.
	* sinput-l.adb (Load_File): If -gnateG is used, write the preprocessed
	file only for the main unit (spec, body and subunits).

Attachment: difs
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]