Commit 647abeaf by Bob Duff Committed by Pierre-Marie de Rodat

[Ada] gprbuild fails to find ghost ALI files

This patch fixes a bug where if a ghost unit is compiled with
ignored-ghost mode in a library project, then gprbuild will fail to find
the ALI file, because the compiler generates an empty object file, but
no ALI file.

2019-07-01  Bob Duff  <duff@adacore.com>

gcc/ada/

	* gnat1drv.adb (gnat1drv): Call Write_ALI if the main unit is
	ignored-ghost.

From-SVN: r272867
parent 1d0b1439
2019-07-01 Bob Duff <duff@adacore.com>
* gnat1drv.adb (gnat1drv): Call Write_ALI if the main unit is
ignored-ghost.
2019-07-01 Yannick Moy <moy@adacore.com> 2019-07-01 Yannick Moy <moy@adacore.com>
* sem_ch4.adb (Operator_Check): Refine error message. * sem_ch4.adb (Operator_Check): Refine error message.
......
...@@ -1453,9 +1453,13 @@ begin ...@@ -1453,9 +1453,13 @@ begin
-- Generate ALI file if specially requested, or for missing subunits, -- Generate ALI file if specially requested, or for missing subunits,
-- subunits or predefined generic. For ignored ghost code, the object -- subunits or predefined generic. For ignored ghost code, the object
-- file IS generated, so Object should be True. -- file IS generated, so Object should be True, and since the object
-- file is generated, we need to generate the ALI file. We never want
-- an object file without an ALI file.
if Opt.Force_ALI_Tree_File then if Is_Ignored_Ghost_Unit (Main_Unit_Node)
or else Opt.Force_ALI_Tree_File
then
Write_ALI (Object => Is_Ignored_Ghost_Unit (Main_Unit_Node)); Write_ALI (Object => Is_Ignored_Ghost_Unit (Main_Unit_Node));
end if; end if;
......
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