Lazbuild: Suppress verbose output when requested to be quiet. Issue #39752, patch by BugsBeGone.

This commit is contained in:
Juha 2022-05-18 00:24:31 +03:00
parent 6c54a68607
commit d84f2a9ebd
3 changed files with 9 additions and 6 deletions

View File

@ -1602,7 +1602,7 @@ begin
try try
Params.Add(Param); Params.Add(Param);
SplitCmdLineParams(Options,Params); SplitCmdLineParams(Options,Params);
List:=RunTool(CompilerFilename,Params); List:=RunTool(CompilerFilename,Params,'',CTConsoleVerbosity<0);
if (List=nil) or (List.Count<1) then exit; if (List=nil) or (List.Count<1) then exit;
Result:=List[0]; Result:=List[0];
if copy(Result,1,6)='Error:' then Result:=''; if copy(Result,1,6)='Error:' then Result:='';
@ -1913,7 +1913,7 @@ begin
SplitCmdLineParams(Options,Params); SplitCmdLineParams(Options,Params);
//DebugLn(['RunFPCVerbose ',CompilerFilename,' ',Params,' ',WorkDir]); //DebugLn(['RunFPCVerbose ',CompilerFilename,' ',Params,' ',WorkDir]);
List:=RunTool(CompilerFilename,Params,WorkDir); List:=RunTool(CompilerFilename,Params,WorkDir,CTConsoleVerbosity<0);
if (List=nil) or (List.Count=0) then begin if (List=nil) or (List.Count=0) then begin
debugln(['Warning: RunFPCVerbose failed: ',CompilerFilename,' ',Params]); debugln(['Warning: RunFPCVerbose failed: ',CompilerFilename,' ',Params]);
exit; exit;

View File

@ -48,7 +48,7 @@ interface
uses uses
SysUtils, Classes, SysUtils, Classes,
// LazUtils // LazUtils
FileUtil, LazFileUtils, LazUTF8, LazLoggerBase, FileUtil, LazFileUtils, LazUTF8, LazLoggerBase, LazUtilities,
// Codetools // Codetools
DefineTemplates; DefineTemplates;
@ -279,7 +279,8 @@ var
begin begin
NewExpValue:=ChompPathDelim(ExpandFileNameUTF8(NewValue)); NewExpValue:=ChompPathDelim(ExpandFileNameUTF8(NewValue));
if NewExpValue=PrimaryConfigPath then exit; if NewExpValue=PrimaryConfigPath then exit;
debugln('SetPrimaryConfigPath NewValue="',UTF8ToConsole(NewValue),'" -> "',UTF8ToConsole(NewExpValue),'"'); if ConsoleVerbosity>=0 then
debugln('SetPrimaryConfigPath NewValue="',UTF8ToConsole(NewValue),'" -> "',UTF8ToConsole(NewExpValue),'"');
PrimaryConfigPath := NewExpValue; PrimaryConfigPath := NewExpValue;
end; end;
@ -288,7 +289,8 @@ end;
---------------------------------------------------------------------------} ---------------------------------------------------------------------------}
procedure SetSecondaryConfigPath(const NewValue: String); procedure SetSecondaryConfigPath(const NewValue: String);
begin begin
debugln('SetSecondaryConfigPath NewValue="',UTF8ToConsole(NewValue),'" -> "',UTF8ToConsole(ExpandFileNameUTF8(NewValue)),'"'); if ConsoleVerbosity>=0 then
debugln('SetSecondaryConfigPath NewValue="',UTF8ToConsole(NewValue),'" -> "',UTF8ToConsole(ExpandFileNameUTF8(NewValue)),'"');
SecondaryConfigPath := ChompPathDelim(ExpandFileNameUTF8(NewValue)); SecondaryConfigPath := ChompPathDelim(ExpandFileNameUTF8(NewValue));
end; end;

View File

@ -5207,7 +5207,8 @@ begin
StateFile:=GetStateFilename; StateFile:=GetStateFilename;
if (not FilenameIsAbsolute(StateFile)) or (not FileExistsUTF8(StateFile)) then if (not FilenameIsAbsolute(StateFile)) or (not FileExistsUTF8(StateFile)) then
begin begin
DebugLn('TProject.DoLoadStateFile Statefile not found: ',StateFile); if ConsoleVerbosity>=0 then
DebugLn('TProject.DoLoadStateFile Statefile not found: ',StateFile);
StateFlags:=StateFlags-[lpsfStateFileLoaded]; StateFlags:=StateFlags-[lpsfStateFileLoaded];
Result:=mrOk; Result:=mrOk;
exit; exit;