]>
Commit | Line | Data |
---|---|---|
70482933 RK |
1 | ------------------------------------------------------------------------------ |
2 | -- -- | |
3 | -- GNAT COMPILER COMPONENTS -- | |
4 | -- -- | |
5 | -- B A C K _ E N D -- | |
6 | -- -- | |
7 | -- S p e c -- | |
8 | -- -- | |
4b490c1e | 9 | -- Copyright (C) 1992-2020, Free Software Foundation, Inc. -- |
70482933 RK |
10 | -- -- |
11 | -- GNAT is free software; you can redistribute it and/or modify it under -- | |
12 | -- terms of the GNU General Public License as published by the Free Soft- -- | |
b5c84c3c | 13 | -- ware Foundation; either version 3, or (at your option) any later ver- -- |
70482933 RK |
14 | -- sion. GNAT is distributed in the hope that it will be useful, but WITH- -- |
15 | -- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -- | |
16 | -- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -- | |
17 | -- for more details. You should have received a copy of the GNU General -- | |
b5c84c3c RD |
18 | -- Public License distributed with GNAT; see file COPYING3. If not, go to -- |
19 | -- http://www.gnu.org/licenses for a complete copy of the license. -- | |
70482933 RK |
20 | -- -- |
21 | -- GNAT was originally developed by the GNAT team at New York University. -- | |
71ff80dc | 22 | -- Extensive contributions were provided by Ada Core Technologies Inc. -- |
70482933 RK |
23 | -- -- |
24 | ------------------------------------------------------------------------------ | |
25 | ||
289a994b | 26 | -- Call the back end with all the information needed |
17ce1f52 | 27 | |
28bc3323 AC |
28 | -- Note: there are multiple bodies/variants of this package, so do not |
29 | -- modify this spec without coordination. | |
30 | ||
70482933 RK |
31 | package Back_End is |
32 | ||
33 | type Back_End_Mode_Type is ( | |
34 | Generate_Object, | |
35 | -- Full back end operation with object file generation | |
36 | ||
37 | Declarations_Only, | |
38 | -- Partial back end operation with no object file generation. In this | |
39 | -- mode the only useful action performed by gigi is to process all | |
1c218ac3 | 40 | -- declarations issuing any error messages (in particular those to |
70482933 RK |
41 | -- do with rep clauses), and to back annotate representation info. |
42 | ||
43 | Skip); | |
44 | -- Back end call is skipped (syntax only, or errors found) | |
45 | ||
46 | pragma Convention (C, Back_End_Mode_Type); | |
47 | for Back_End_Mode_Type use (0, 1, 2); | |
48 | ||
49 | procedure Call_Back_End (Mode : Back_End_Mode_Type); | |
50 | -- Call back end, i.e. make call to driver traversing the tree and | |
752b81d9 AC |
51 | -- outputting code. This call is made with all tables locked. The back |
52 | -- end is responsible for unlocking any tables it may need to change, | |
53 | -- and locking them again before returning. | |
70482933 RK |
54 | |
55 | procedure Scan_Compiler_Arguments; | |
56 | -- Acquires command-line parameters passed to the compiler and processes | |
f53f9dd7 | 57 | -- them. Calls Scan_Front_End_Switches for any front-end switches found. |
70482933 | 58 | -- |
f53f9dd7 RD |
59 | -- The processing of arguments is private to the back end, since the way |
60 | -- of acquiring the arguments as well as the set of allowable back end | |
61 | -- switches is different depending on the particular back end being used. | |
70482933 | 62 | -- |
f53f9dd7 RD |
63 | -- Any processed switches that influence the result of a compilation must |
64 | -- be added to the Compilation_Arguments table. | |
061e86a8 AC |
65 | -- |
66 | -- This routine is expected to set the following to True if necessary (the | |
67 | -- default for all of these in Opt is False). | |
68 | -- | |
17ce1f52 AC |
69 | -- Opt.Disable_FE_Inline |
70 | -- Opt.Disable_FE_Inline_Always | |
061e86a8 AC |
71 | -- Opt.Suppress_Control_Float_Optimizations |
72 | -- Opt.Generate_SCO | |
73 | -- Opt.Generate_SCO_Instance_Table | |
74 | -- Opt.Stack_Checking_Enabled | |
75 | -- Opt.No_Stdinc | |
76 | -- Opt.No_Stdlib | |
70482933 | 77 | |
a0fb8fe8 | 78 | procedure Gen_Or_Update_Object_File; |
39ade2f9 AC |
79 | -- Is used to generate the object file (if generated directly by gnat1), or |
80 | -- update it if it has already been generated by the call to Call_Back_End, | |
81 | -- so that its timestamp is updated by the call. | |
82 | -- | |
83 | -- This is a no-op with the gcc back-end (the object file is generated by | |
84 | -- the assembler afterwards), but is needed for back-ends that directly | |
57d3adcd AC |
85 | -- generate the final object file so that the object file's timestamp is |
86 | -- correct when compared with the corresponding ali file by gnatmake. | |
a0fb8fe8 | 87 | |
70482933 | 88 | end Back_End; |