-
Notifications
You must be signed in to change notification settings - Fork 1
/
prettier_ada.gpr
45 lines (36 loc) · 1.24 KB
/
prettier_ada.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
--
-- Copyright (C) 2023, AdaCore
-- SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
--
with "gnatcoll_core";
with "vss_text";
library project Prettier_Ada is
type Build_Mode_Type is ("dev", "prod");
Build_Mode : Build_Mode_Type :=
external ("PRETTIER_ADA_BUILD_MODE", "prod");
type Library_Type_Type is ("static", "static-pic", "relocatable");
Library_Type : Library_Type_Type :=
external ("PRETTIER_ADA_LIBRARY_TYPE",
external ("LIBRARY_TYPE", "static"));
for Library_Name use "prettier_ada";
for Library_Dir use "lib/" & Library_Type & "/" & Build_Mode;
for Library_Kind use Library_Type;
for Object_Dir use "obj/" & Library_Type & "/" & Build_Mode;
for Source_Dirs use ("src/");
package Compiler is
Common_Switches :=
("-fPIC", "-gnatX", "-gnatyg", "-g", "-gnatwa", "-gnatw.u");
case Build_Mode is
when "dev" =>
for Default_Switches ("Ada") use
Common_Switches
& ("-gnatwe",
"-O0",
"-gnata",
"-gnatVa");
when "prod" =>
for Default_Switches ("Ada") use
Common_Switches & ("-Ofast");
end case;
end Compiler;
end Prettier_Ada;