Natools

Check-in [2a24860505]
Login
Overview
Comment:natools.gpr: add a profiling mode to the build
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 2a24860505150456de596a923b7681c17993eb80
User & Date: nat on 2016-11-30 22:30:01
Other Links: manifest | tags
Context
2016-12-01
20:10
tools/smaz: refactor dictionary processing in a dedicated procedure check-in: ef7006737f user: nat tags: trunk
2016-11-30
22:30
natools.gpr: add a profiling mode to the build check-in: 2a24860505 user: nat tags: trunk
2016-11-29
20:37
tools/smaz: basic adaptation to use the generic framework check-in: ab9c060396 user: nat tags: trunk
Changes

Modified natools.gpr from [3162d5a04a] to [15b76671a5].

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
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

-
+














+
+













+
+







project Natools is
   type Build_Type is ("Release", "Coverage");
   type Build_Type is ("Release", "Coverage", "Profiling");
   Mode : Build_Type := external ("MODE", "Release");

   type Task_Safety is ("None", "Portable", "Intel");
      --  Task-safe, portable, efficient: choose two
   Safety : Task_Safety := external ("TASK_SAFETY", "None");

   Prefix := "";
   Extra_Switches := ();

   case Mode is
      when "Release" =>
         Prefix := "";
      when "Coverage" =>
         Prefix := "coverage/";
      when "Profiling" =>
         Prefix := "profiling/";
   end case;

   --  Source_Dirs is left to default "."
   for Source_Dirs use ("src", "generated");
   for Object_Dir use Prefix & "obj";
   for Exec_Dir use Prefix & "bin";

   case Mode is
      when "Release" =>
         Extra_Switches := ("-O3");
      when "Coverage" =>
         Extra_Switches :=
           ("-g", "-O0", "-fprofile-arcs", "-ftest-coverage");
      when "Profiling" =>
         Extra_Switches := ("-O3", "-g", "-pg");
   end case;


   package Compiler is
      for Default_Switches ("Ada") use
        ("-gnatafnovy",
            --  a: assersions enabled