This repository was archived by the owner on Jan 12, 2022. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbob.gpr
82 lines (72 loc) · 2.29 KB
/
bob.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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
project bob is
for Main use ("bob.adb");
for Source_Dirs use ("src/**");
for Object_Dir use "obj";
for Exec_Dir use "bin";
for Create_Missing_Dirs use "True";
type Mode_Type is ("debug", "release", "analyze");
Mode : Mode_Type := external ("Mode", "debug");
package Builder is
case Mode is
when "release" =>
for Default_Switches("ada") use ("-j0", "-gnat2012");
when others =>
for Default_Switches("ada") use ("-j0", "-gnat2012", "-g");
end case;
for Global_Configuration_Pragmas use "gnat.adc";
end Builder;
package Binder is
case Mode is
when "release" =>
for Default_Switches("ada") use ("-static");
when others =>
for Default_Switches("ada") use ("-E", "-shared");
end case;
end Binder;
package Compiler is
case Mode is
when "debug" =>
for Default_Switches ("ada") use ("-gnatwa",
"-fstack-check",
"-gnatVa",
"-gnatU",
"-gnatf",
"-gnateE",
"-gnaty3aAbCdefhIklnOprSux",
"-gnatwe");
when "release" =>
for Default_Switches ("ada") use ("-O2",
"-ffunction-sections",
"-fdata-sections",
"-s");
when "analyze" =>
for Default_Switches ("ada") use ("-pg",
"-fprofile-arcs",
"-ftest-coverage");
end case;
end Compiler;
package Linker is
case Mode is
when "debug" =>
for Default_Switches ("ada") use ("-no-pie");
when "release" =>
for Default_Switches ("ada") use ("-Wl,--gc-sections",
"-s",
"-O2");
when "analyze" =>
for Default_Switches ("ada") use ("-no-pie", "-pg", "-fprofile-arcs");
end case;
end Linker;
package Pretty_Printer is
for Default_Switches("ada") use ("--RM-style-spacing",
"--no-separate-loop-then",
"--no-separate-is",
"-rnb",
"-j0");
end Pretty_Printer;
package GnatTest is
for Tests_Dir use "../tests";
for Harness_Dir use "../tests/driver";
for GnatTest_Switches use ("--omit-sloc", "--test-case-only");
end GnatTest;
end bob;