diff options
author | Hristian Kirtchev <kirtchev@adacore.com> | 2019-07-09 07:54:29 +0000 |
---|---|---|
committer | Pierre-Marie de Rodat <pmderodat@gcc.gnu.org> | 2019-07-09 07:54:29 +0000 |
commit | 16cc65b61a7c00920ff66d45d3b23a9e313dd1b8 (patch) | |
tree | f81c44045c09863a44e70504872ec7c148f000f3 /gcc/ada/bindo.adb | |
parent | fb95bfcc8138378d4e5786c67f5eb49b84a54683 (diff) | |
download | gcc-16cc65b61a7c00920ff66d45d3b23a9e313dd1b8.zip gcc-16cc65b61a7c00920ff66d45d3b23a9e313dd1b8.tar.gz gcc-16cc65b61a7c00920ff66d45d3b23a9e313dd1b8.tar.bz2 |
[Ada] Elaboration order v4.0 activation
This patch enables the elaboration order v4.0 as the default elaboration
order in GNATbind. The previous v3.0 elaboration order is now referred
to as the "legacy elaboration order mechanism" and is available using
binder switch -H.
2019-07-09 Hristian Kirtchev <kirtchev@adacore.com>
gcc/ada/
* bindo.adb: Remove with and use clauses for Debug. Add with
and use clauses for Opt.
(Find_Elaboration_Order): Enable the v4.0 elaboration order. The
v3.0 mechanism is now available under binder switch -H.
* bindusg.adb (Display): Enable switch -H.
* debug.adb: Free compiler switch -gnatd_G. Free binder switch
-d_N.
* sem_elab.adb: Update the section on switches to remove
-gnatd_G.
(Invocation_Graph_Recording_OK): The invocation graph is now
unconditionally recorded in ALI files.
* switch-b.adb (Scan_Binder_Switches): Scan switch -H.
* doc/gnat_ugn/building_executable_programs_with_gnat.rst:
Update the documentation on compiler switches related to
elaboration. Update the documentation on binder switches to
include switch -H.
* doc/gnat_ugn/elaboration_order_handling_in_gnat.rst: Update
the documentation on elaboration order handling in GNAT.
* gnat_ugn.texi: Regenerate.
From-SVN: r273280
Diffstat (limited to 'gcc/ada/bindo.adb')
-rw-r--r-- | gcc/ada/bindo.adb | 33 |
1 files changed, 5 insertions, 28 deletions
diff --git a/gcc/ada/bindo.adb b/gcc/ada/bindo.adb index 897e746..519887d 100644 --- a/gcc/ada/bindo.adb +++ b/gcc/ada/bindo.adb @@ -24,7 +24,7 @@ ------------------------------------------------------------------------------ with Binde; -with Debug; use Debug; +with Opt; use Opt; with Bindo.Elaborators; use Bindo.Elaborators; @@ -426,9 +426,7 @@ package body Bindo is -- Units and routines of interest: -- Bindo.Elaborators -- Elaborate_Library_Graph - -- Elaborate_Units_Common - -- Elaborate_Units_Dynamic - -- Elaborate_Units_Static + -- Elaborate_Units -- -- * Invalid invocation graph -- @@ -490,40 +488,19 @@ package body Bindo is Main_Lib_File : File_Name_Type) is begin - -- ??? Enable the following code when switching from the old to the new - -- elaboration-order mechanism. - -- Use the library graph and heuristic-based elaboration order when -- switch -H (legacy elaboration-order mode enabled). - -- if Legacy_Elaboration_Order then - -- Binde.Find_Elab_Order (Order, Main_Lib_File); + if Legacy_Elaboration_Order then + Binde.Find_Elab_Order (Order, Main_Lib_File); -- Otherwise use the invocation and library-graph-based elaboration -- order. - -- else - -- Invocation_And_Library_Graph_Elaborators.Elaborate_Units - -- (Order => Order, - -- Main_Lib_File => Main_Lib_File); - -- end if; - - -- ??? Remove the following code when switching from the old to the new - -- elaboration-order mechanism. - - -- Use the invocation and library-graph-based elaboration order when - -- switch -d_N (new bindo order) is in effect. - - if Debug_Flag_Underscore_NN then + else Invocation_And_Library_Graph_Elaborators.Elaborate_Units (Order => Order, Main_Lib_File => Main_Lib_File); - - -- Otherwise use the library-graph and heuristic-based elaboration - -- order. - - else - Binde.Find_Elab_Order (Order, Main_Lib_File); end if; end Find_Elaboration_Order; |