-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathravenscar_build.gpr.in
More file actions
45 lines (36 loc) · 1.53 KB
/
Copy pathravenscar_build.gpr.in
File metadata and controls
45 lines (36 loc) · 1.53 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
with "target_options.gpr";
with "runtime_build.gpr";
project Ravenscar_Build is
for Languages use ("Ada", "Asm_Cpp");
for Runtime ("Ada") use Runtime_Build'Runtime("Ada");
for Target use Runtime_Build'Target;
for Library_Auto_Init use "False";
for Library_Name use "gnarl";
for Library_Kind use Runtime_Build'Library_Kind;
for Library_Options use Runtime_Build'Library_Options;
for Library_Version use "libgnarl-" & Target_Options.Version & ".so";
for Library_Dir use "adalib";
for Object_Dir use "obj";
for Source_Dirs use ("gnarl_user", "gnarl");
GPR_Tool := external ("GPR_TOOL", "");
case GPR_Tool is
when "gnatprove" =>
for Externally_Built use "True";
when others =>
null;
end case;
package Compiler is
for Default_Switches ("C") use Target_Options.GNARL_CFLAGS;
for Default_Switches ("Ada") use Target_Options.GNARL_ADAFLAGS & ("-gnaty-d");
for Default_Switches ("Asm_Cpp") use Target_Options.ASMFLAGS;
-- Always build System.BB.CPU_Primitives at -O2 as some targets may make
-- use of inline assembly that rely on specific compiler behaviour to
-- load constants that are not enabled at -O0.
for Switches ("s-bbcppr.adb") use Target_Options.GNARL_ADAFLAGS
& ("-O2", "-gnaty-d");
-- Some runtime files need to be compiled with debug info, so that gdb
-- is not blind.
for Switches ("s-tasdeb.adb") use Target_Options.ALL_ADAFLAGS
& ("-g", "-O0", "-gnaty-d");
end Compiler;
end Ravenscar_Build;