aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/gnat2.gpr
blob: 9d9f3b550575fe68800956fc50cec07cd12e40bd (plain)
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
--  The "2" in Gnat2 is arbitrary and is there because "gnat.gpr" already
--  exists in the repository.
project Gnat2 is

   --  We need C++ as a language to force the use of g++ for linking. That
   --  causes GPRbuild to emit a warning because we don't have C++ source
   --  files, but it should be fine.
   for Languages use ("Ada", "C++");

   for Main use ("gnat1drv.adb",
                 "gnatbind.adb",
                 "gnatmake.adb",
                 "gnatlink.adb",
                 "gnatcmd.adb",
                 "gnatchop.adb",
                 "gnatkr.adb",
                 "gnatls.adb",
                 "gnatprep.adb",
                 "gnatname.adb",
                 "gnatclean.adb");

   Build_Dir := external ("Build_Dir");

   Generated_Dir := Build_Dir & "/generated";

   for Source_Dirs use (".", Build_Dir, Generated_Dir);

   for Excluded_Source_Files use
     ("indepsw-aix.adb",
      "indepsw-darwin.adb",
      "ada_get_targ.adb",
      "indepsw-gnu.adb",
      "seinfo_tables.ads",
      "seinfo_tables.adb");

   for Object_Dir use Build_Dir;

   for Exec_Dir use Build_dir & "/..";

   package Builder is
      for Executable ("gnat1drv.adb") use "gnat1";

      for Executable ("gnatcmd.adb") use "gnat";

   end Builder;

   package Coverage is
      --  To make building from the oldest supported compiler work, we copy a handful
      --  of fresh source files from the run-time library. We need gnatcov to not instrument
      --  those files, so we add the clause below. It's unknown why only putting "GNAT" is sufficient???
      --  We also pull in GNAT.Lists for example, but specifying it here triggers a warning.
      Overridden_Runtime_Units := ("GNAT");

      --  We don't want to instrument code generation tools
      Codegen_Units :=
        ("Gen_IL",
         "Gen_IL.Gen",
         "Gen_IL.Fields",
         "Gen_IL.Gen.Gen_Entities",
         "Gen_IL.Gen.Gen_Nodes",
         "Gen_IL.Internals",
         "Gen_IL.Main",
         "Gen_IL.Types",
         "XSnamesT",
         "XUtil",
         "XOSCons",
         "XLeaps");

      for Excluded_Units use Overridden_Runtime_Units & Codegen_Units;
   end Coverage;
end Gnat2;