-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathgpr2.gpr
More file actions
249 lines (230 loc) · 8.79 KB
/
gpr2.gpr
File metadata and controls
249 lines (230 loc) · 8.79 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
--
-- Copyright (C) 2019-2026, AdaCore
--
-- SPDX-License-Identifier: Apache-2.0
--
with "gnatcoll_core";
with "gnatcoll_iconv";
with "gnatcoll_gmp";
with "xmlada";
library project GPR2 extends "gpr2_shared.gpr" is
type Bool is ("true", "false");
Is_Externally_Built : Bool := external ("EXTERNALLY_BUILT", "false");
for Externally_Built use Is_Externally_Built;
for Source_Dirs use ("src/lib",
"src/build",
"src/private",
Build_Root & "/kb",
"langkit/gen/src");
for Library_Name use "gpr2";
for Object_Dir use Build_Root & "/" & Build & "/obj-" & Library_Type;
for Library_Dir use Build_Root & "/" & Build & "/lib-" & Library_Type;
for Library_Kind use Library_Type;
for Run_Path_Option use ();
case Library_Type is
when "relocatable" =>
for Library_Interface use
("GPR2",
"GPR2.Build",
"GPR2.Build.Actions",
"GPR2.Build.Actions.Ada_Bind",
"GPR2.Build.Actions.Compile",
"GPR2.Build.Actions.Compile.Ada",
"GPR2.Build.Actions.Link",
"GPR2.Build.Actions.Post_Bind",
"GPR2.Build.Actions_Population",
"GPR2.Build.Ali_Parser",
"GPR2.Build.Artifacts",
"GPR2.Build.Artifacts.Files",
"GPR2.Build.Artifacts.Key_Value",
"GPR2.Build.Artifacts.Library",
"GPR2.Build.Artifacts.Object_File",
"GPR2.Build.Command_Line",
"GPR2.Build.Compilation_Unit",
"GPR2.Build.Compilation_Unit.Maps",
"GPR2.Build.External_Options",
"GPR2.Build.Jobserver",
"GPR2.Build.Jobserver_Protocol",
"GPR2.Build.Jobserver_Protocol.Semaphore",
"GPR2.Build.Options",
"GPR2.Build.Process_Manager",
"GPR2.Build.Process_Manager.JSON",
"GPR2.Build.Response_Files",
"GPR2.Build.Signature",
"GPR2.Build.Source",
"GPR2.Build.Source.Sets",
"GPR2.Build.Source_Base",
"GPR2.Build.Source_Base.Ada_Parser",
"GPR2.Build.Source_Base.Vectors",
"GPR2.Build.Tree_Db",
"GPR2.Build.Unit_Info",
"GPR2.Build.Unit_Info.List",
"GPR2.Build.View_Db",
"GPR2.Build.View_Tables",
"GPR2.Configuration_Internal",
"GPR2.Containers",
"GPR2.Context",
"GPR2.Environment",
"GPR2.File_Readers",
"GPR2.KB",
"GPR2.Log",
"GPR2.Message",
"GPR2.Options",
"GPR2.Options.Opt_Parse",
"GPR2.Pack_Internal",
"GPR2.Path_Name",
"GPR2.Path_Name.Set",
"GPR2.Project",
"GPR2.Project.Attr_Values",
"GPR2.Project.Attribute",
"GPR2.Project.Attribute.Set",
"GPR2.Project.Attribute_Cache",
"GPR2.Project.Attribute_Index",
"GPR2.Project.Configuration",
"GPR2.Project.External",
"GPR2.Project.Import",
"GPR2.Project.Import.Set",
"GPR2.Project.Name_Values",
"GPR2.Project.Pretty_Printer",
"GPR2.Project.Registry",
"GPR2.Project.Registry.Attribute",
"GPR2.Project.Registry.Attribute.Description",
"GPR2.Project.Registry.Exchange",
"GPR2.Project.Registry.Pack",
"GPR2.Project.Registry.Pack.Description",
"GPR2.Project.Tree",
"GPR2.Project.Tree.View_Builder",
"GPR2.Project.Typ",
"GPR2.Project.Typ.Set",
"GPR2.Project.Variable",
"GPR2.Project.Variable.Set",
"GPR2.Project.View",
"GPR2.Project.View.Set",
"GPR2.Project.View.Vector",
"GPR2.Project_Parser",
"GPR2.Project_Parser.Set",
"GPR2.Reporter",
"GPR2.Reporter.Console",
"GPR2.Reporter.Holders",
"GPR2.Reporter.Log",
"GPR2.Source_Reference",
"GPR2.Source_Reference.Attribute",
"GPR2.Source_Reference.Identifier",
"GPR2.Source_Reference.Pack",
"GPR2.Source_Reference.Scalar_Value",
"GPR2.Source_Reference.Text_Value",
"GPR2.Source_Reference.Value",
"GPR2.Tree_Internal",
"GPR2.Tree_Internal.View_Builder",
"GPR2.Utils",
"GPR2.Utils.Hash",
"GPR2.Version",
"GPR2.View_Base_Internal",
"GPR2.View_Ids",
"GPR2.View_Ids.Dags",
"GPR2.View_Ids.Set",
"GPR2.View_Ids.Vector",
"GPR2.View_Internal",
"GPR_Parser",
"GPR_Parser.Analysis",
"GPR_Parser.Basic_Ada_Parser",
"GPR_Parser.Common",
"GPR_Parser.Debug",
"GPR_Parser.Generic_Api",
"GPR_Parser.Generic_Api.Introspection",
"GPR_Parser.Implementation",
"GPR_Parser.Lexer_Implementation",
"GPR_Parser.Parsers",
"GPR_Parser.Private_Converters",
"GPR_Parser.Rewriting",
"GPR_Parser_Adasat",
"GPR_Parser_Adasat.Builders",
"GPR_Parser_Adasat.Decisions",
"GPR_Parser_Adasat.Dpll",
"GPR_Parser_Adasat.Formulas",
"GPR_Parser_Adasat.Internals",
"GPR_Parser_Adasat.Theory",
"GPR_Parser_Adasat.Vectors",
"GPR_Parser_Support",
"GPR_Parser_Support.Adalog",
"GPR_Parser_Support.Adalog.Debug",
"GPR_Parser_Support.Adalog.Logic_Var",
"GPR_Parser_Support.Adalog.Solver",
"GPR_Parser_Support.Adalog.Solver_Interface",
"GPR_Parser_Support.Array_Utils",
"GPR_Parser_Support.Bump_Ptr",
"GPR_Parser_Support.Cheap_Sets",
"GPR_Parser_Support.Diagnostics",
"GPR_Parser_Support.Errors",
"GPR_Parser_Support.File_Readers",
"GPR_Parser_Support.Generic_Api",
"GPR_Parser_Support.Generic_Api.Analysis",
"GPR_Parser_Support.Generic_Api.Introspection",
"GPR_Parser_Support.Generic_Bump_Ptr",
"GPR_Parser_Support.Hashes",
"GPR_Parser_Support.Images",
"GPR_Parser_Support.Internal",
"GPR_Parser_Support.Internal.Analysis",
"GPR_Parser_Support.Internal.Conversions",
"GPR_Parser_Support.Internal.Descriptor",
"GPR_Parser_Support.Internal.Introspection",
"GPR_Parser_Support.Lexical_Envs",
"GPR_Parser_Support.Lexical_Envs_Impl",
"GPR_Parser_Support.Names",
"GPR_Parser_Support.Relative_Get",
"GPR_Parser_Support.Slocs",
"GPR_Parser_Support.Symbols",
"GPR_Parser_Support.Symbols.Precomputed",
"GPR_Parser_Support.Text",
"GPR_Parser_Support.Token_Data_Handlers",
"GPR_Parser_Support.Types",
"GPR_Parser_Support.Vectors");
for Languages use ("Ada");
when others =>
for Languages use ("Ada", "C");
end case;
--------------
-- Compiler --
--------------
Langkit_Parser_Options := ("-g");
package Compiler extends GPR2_Shared.Compiler is
case Build is
when "debug" | "gnatcov" =>
Langkit_Parser_Options := Langkit_Parser_Options & ("-O0");
when "release_checks" =>
Langkit_Parser_Options := Langkit_Parser_Options & ("-Ofast");
when "release" =>
Langkit_Parser_Options := Langkit_Parser_Options & ("-Ofast");
end case;
-- Langkit parser
for Switches ("gpr_parser-*") use Langkit_Parser_Options & ("-gnatws");
for Switches ("gpr_parser_*") use Langkit_Parser_Options & ("-gnatws");
for Switches ("gpr_parser.*") use Langkit_Parser_Options & ("-gnatws");
for Switches ("gpr_parser-gdb.c") use Langkit_Parser_Options;
-- generated knowledge base
for Switches ("gpr2-kb-embedded.adb") use
Compiler'Default_Switches ("Ada") & ("-gnatws", "-gnatyN");
end Compiler;
--------------
-- Coverage --
--------------
package Coverage is
for Excluded_Units use ("gpr_parser*");
end Coverage;
package Install is
for Artifacts ("share/examples/gpr2") use ("examples/libgpr2/*");
end Install;
------------
-- Naming --
------------
package Naming is
case Target is
when "Windows_NT" =>
for Body ("GPR2.Build.Jobserver_Protocol.Semaphore") use
"gpr2-build-jobserver_protocol-semaphore.adb";
when "UNIX" =>
for Body ("GPR2.Build.Jobserver_Protocol.Semaphore") use
"gpr2-build-jobserver_protocol-semaphore__dummy.adb";
end case;
end Naming;
end GPR2;