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

View File

@ -48,7 +48,7 @@ interface
uses
SysUtils, Classes,
// LazUtils
FileUtil, LazFileUtils, LazUTF8, LazLoggerBase,
FileUtil, LazFileUtils, LazUTF8, LazLoggerBase, LazUtilities,
// Codetools
DefineTemplates;
@ -279,7 +279,8 @@ var
begin
NewExpValue:=ChompPathDelim(ExpandFileNameUTF8(NewValue));
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;
end;
@ -288,7 +289,8 @@ end;
---------------------------------------------------------------------------}
procedure SetSecondaryConfigPath(const NewValue: String);
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));
end;

View File

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