-
-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathyass.gpr
93 lines (82 loc) · 2.69 KB
/
yass.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
83
84
85
86
87
88
89
90
91
92
93
with "config/yass_config.gpr";
project Yass is
for Source_Dirs use ("src/", "config/");
for Object_Dir use "obj/" & Yass_Config.Build_Profile;
for Create_Missing_Dirs use "True";
for Exec_Dir use "bin";
for Main use ("yass.adb");
type Mode_Type is ("dev", "debug", "release", "analyze");
Mode : Mode_Type := external ("Mode", "dev");
type OS_Type is ("Windows", "Unix");
OS : OS_Type := external ("YASS_OS", "Unix");
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");
for Global_Configuration_Pragmas use "gnat.adc";
end case;
end Builder;
package Compiler is
for Default_Switches ("Ada") use Yass_Config.Ada_Compiler_Switches;
case Mode is
when "dev" | "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",
"-flto");
when "analyze" =>
for Default_Switches ("ada") use ("-pg",
"-fprofile-arcs",
"-ftest-coverage");
end case;
end Compiler;
package Linker is
Release_Switches := ("-Wl,--gc-sections",
"-s",
"-O2",
"-lcmark",
"-flto");
case Mode is
when "dev" | "release" =>
for Default_Switches ("Ada") use ("-lcmark");
when "debug" =>
for Default_Switches ("ada") use ("-no-pie", "-lcmark");
when "analyze" =>
for Default_Switches ("ada") use ("-no-pie",
"-pg",
"-fprofile-arcs",
"-lcmark");
end case;
end Linker;
package Pretty_Printer is
for Default_Switches("ada") use ("--RM-style-spacing",
"--no-separate-loop-then",
"--no-separate-is",
"-rnb",
"-c0");
end Pretty_Printer;
-- Unit tests on hold until ported to alire
-- package GnatTest is
-- for Tests_Dir use "../tests";
-- for Harness_Dir use "../tests/driver";
-- for GnatTest_Switches use ("--omit-sloc",
-- "--test-case-only",
-- "--passed-tests=hide",
-- "--exit-status=on");
-- end GnatTest;
package Install is
for Artifacts (".") use ("share");
end Install;
end Yass;