-
Notifications
You must be signed in to change notification settings - Fork 0
/
ada_wfc.gpr
59 lines (44 loc) · 1.65 KB
/
ada_wfc.gpr
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
project Ada_WFC is
Name := "ada_wfc";
for Create_Missing_Dirs use "True";
for Source_Dirs use ("src");
for Ignore_Source_Sub_Dirs use (".git", ".vscode");
type Build_Mode is ("debug", "release");
Mode : Build_Mode := external ("mode", "debug");
type Library_Mode is ("static", "dynamic");
Lib_Mode : Library_Mode := external ("LIBRARY_TYPE", "dynamic");
for Object_Dir use "obj/" & Mode;
for Library_Dir use "lib/" & Mode;
for Library_Name use Name;
for Library_Kind use Lib_Mode;
package Builder is
for Default_Switches ("Ada") use ("-s");
end Builder;
package Binder is
for Default_Switches ("Ada") use ("-E");
end Binder;
package Compiler is
Extra_Switches := ();
case Mode is
when "release" =>
Extra_Switches :=
( "-O3" -- fast
, "-gnatp" -- furious (don't check runtime stuff)
, "-gnatB" -- assume valid values always
-- , "-gnatn" -- inline stuff (broken for some reason?)
);
when "debug" =>
Extra_Switches :=
( "-g" -- debug symbols
, "-O0" -- NOT fast
, "-gnateE" -- better exception messages
, "-gnateG" -- produce expanded source code
, "-gnata" -- enable assertions and debug pragmas
, "-gnatwa" -- warnings
, "-gnatVa" -- check for validity of values
);
end case;
for Default_Switches ("Ada") use
("-gnat12", "-gnatW8") & Extra_Switches;
end Compiler;
end Ada_WFC;