summaryrefslogtreecommitdiff
path: root/gcc/ada/gnat1drv.adb
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/ada/gnat1drv.adb')
-rw-r--r--gcc/ada/gnat1drv.adb21
1 files changed, 20 insertions, 1 deletions
diff --git a/gcc/ada/gnat1drv.adb b/gcc/ada/gnat1drv.adb
index 813765b7710..53041cea133 100644
--- a/gcc/ada/gnat1drv.adb
+++ b/gcc/ada/gnat1drv.adb
@@ -863,10 +863,18 @@ begin
Write_Str (" (missing subunits)");
Write_Eol;
+ -- Force generation of ALI file, for backward compatibility
+
+ Opt.Force_ALI_Tree_File := True;
+
elsif Main_Kind = N_Subunit then
Write_Str (" (subunit)");
Write_Eol;
+ -- Force generation of ALI file, for backward compatibility
+
+ Opt.Force_ALI_Tree_File := True;
+
elsif Main_Kind = N_Subprogram_Declaration then
Write_Str (" (subprogram spec)");
Write_Eol;
@@ -877,6 +885,10 @@ begin
Write_Str (" (predefined generic)");
Write_Eol;
+ -- Force generation of ALI file, for backward compatibility
+
+ Opt.Force_ALI_Tree_File := True;
+
-- Only other case is a package spec
else
@@ -893,7 +905,14 @@ begin
Errout.Output_Messages;
Treepr.Tree_Dump;
Tree_Gen;
- Write_ALI (Object => False);
+
+ -- Generate ALI file if specially requested, or for missing subunits,
+ -- subunits or predefined generic.
+
+ if Opt.Force_ALI_Tree_File then
+ Write_ALI (Object => False);
+ end if;
+
Namet.Finalize;
Check_Rep_Info;