Browse Source

Add -vj option in options unit to set V_Parallel
Add mainsourcefile to all messages when V_Parallel verbosity option is set
Flatten out -vX options in help message to make changes easier
Add -vj option in help message

Pierre Muller 1 year ago
parent
commit
63642b13c8
3 changed files with 38 additions and 12 deletions
  1. 8 1
      compiler/comphook.pas
  2. 26 11
      compiler/msg/errore.msg
  3. 4 0
      compiler/verbose.pas

+ 8 - 1
compiler/comphook.pas

@@ -311,7 +311,14 @@ begin
       if (status.verbosity and Level)=V_Fatal then
       if (status.verbosity and Level)=V_Fatal then
         MsgTypeStr:=fatalstr;
         MsgTypeStr:=fatalstr;
       if (status.verbosity and V_Parallel)=V_Parallel then
       if (status.verbosity and V_Parallel)=V_Parallel then
-        MsgTypeStr:=MsgTypeStr+'('+inputfilename+'/'+status.currentmodule+')'
+        begin
+          if (inputfilename<>'') and (status.currentmodule<>'') then
+            MsgTypeStr:=MsgTypeStr+'('+inputfilename+'/'+status.currentmodule+')'
+          else if (status.currentmodule<>'') then
+            MsgTypeStr:=MsgTypeStr+'('+status.currentmodule+')'
+          else if (inputfilename<>'') then
+            MsgTypeStr:=MsgTypeStr+'('+inputfilename+')';
+        end
       else if (status.verbosity and Level)=V_Used then
       else if (status.verbosity and Level)=V_Used then
         MsgTypeStr:=PadSpace('('+status.currentmodule+')',10);
         MsgTypeStr:=PadSpace('('+status.currentmodule+')',10);
 
 

+ 26 - 11
compiler/msg/errore.msg

@@ -4361,18 +4361,33 @@ W*2Twasi_The WebAssembly System Interface (WASI)
 **2Ur_Generate release unit files (never automatically recompiled)
 **2Ur_Generate release unit files (never automatically recompiled)
 **2Us_Compile a system unit
 **2Us_Compile a system unit
 **1v<x>_Be verbose. <x> is a combination of the following letters:
 **1v<x>_Be verbose. <x> is a combination of the following letters:
-**2*_0 : Show nothing (except errors) p : Write tree.log with parse tree
-**2*_a : Show everything              q : Show message numbers
-**2*_b : Write file names messages    r : Rhide/GCC compatibility mode
-**2*_    with full path               s : Show time stamps
-**2*_c : Show conditionals            t : Show tried/used files
-**2*_d : Show debug info              u : Show unit info
-**2*_e : Show errors (default)        v : Write fpcdebug.txt with
-**2*_h : Show hints                       lots of debugging info
-**2*_i : Show general info            w : Show warnings
-**2*_l : Show linenumbers             x : Show info about invoked tools
+**2*_0 : Show nothing (except errors)
+**2*_a : Show everything
+**2*_b : Write file names messages with full path
+**2*_c : Show conditionals
+**2*_d : Show debug info
+**2*_e : Show errors (default)
+#**2*_f : Not used yet
+#**2*_g : Not used yet
+**2*_h : Show hints
+**2*_i : Show general info
+**2*_j : Always add main source (useful when run in parallel make)
+#**2*_k : Not used yet
+**2*_l : Show linenumbers
 **2*_m<x>,<y> : Do not show messages numbered <x> and <y>
 **2*_m<x>,<y> : Do not show messages numbered <x> and <y>
-**2*_n : Show notes                   z : Write output to stderr
+**2*_n : Show notes
+#**2*_o : Not used yet
+**2*_p : Write tree.log with parse tree
+**2*_q : Show message numbers
+**2*_r : Rhide/GCC compatibility mode
+**2*_s : Show time stamps
+**2*_t : Show tried/used files
+**2*_u : Show unit info
+**2*_v : Write fpcdebug.txt with lots of debugging info
+**2*_w : Show warnings
+**2*_x : Show info about invoked tools
+#**2*_y : Not used yet
+**2*_z : Write output to stderr
 F*1V<x>_Append '-<x>' to the used compiler binary name (e.g. for version)
 F*1V<x>_Append '-<x>' to the used compiler binary name (e.g. for version)
 **1W<x>_Target-specific options (targets)
 **1W<x>_Target-specific options (targets)
 3*2WA_Specify native type application (Windows)
 3*2WA_Specify native type application (Windows)

+ 4 - 0
compiler/verbose.pas

@@ -327,6 +327,10 @@ implementation
                          status.verbosity:=status.verbosity and (not V_Info)
                          status.verbosity:=status.verbosity and (not V_Info)
                        else
                        else
                          status.verbosity:=status.verbosity or V_Info;
                          status.verbosity:=status.verbosity or V_Info;
+                 'J' : if inverse then
+                         status.verbosity:=status.verbosity and (not V_Parallel)
+                       else
+                         status.verbosity:=status.verbosity or V_Parallel;
                  'L' : if inverse then
                  'L' : if inverse then
                          status.verbosity:=status.verbosity and (not V_Status)
                          status.verbosity:=status.verbosity and (not V_Status)
                        else
                        else