mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-09 01:29:08 +02:00
Add wposuffix to keep different logs for each pass when passes is > 1
git-svn-id: trunk@48800 -
This commit is contained in:
parent
0216f77819
commit
63a3c25493
@ -839,7 +839,7 @@ end;
|
||||
function RunCompiler(const ExtraPara: string):boolean;
|
||||
var
|
||||
args,LocalExtraArgs,
|
||||
wpoargs : string;
|
||||
wpoargs,wposuffix : string;
|
||||
passnr,
|
||||
passes : longint;
|
||||
execres : boolean;
|
||||
@ -880,6 +880,7 @@ begin
|
||||
if Config.NeedOptions<>'' then
|
||||
AppendOptions(Config.NeedOptions,args);
|
||||
wpoargs:='';
|
||||
wposuffix:='';
|
||||
if (Config.WpoPasses=0) or
|
||||
(Config.WpoParas='') then
|
||||
passes:=1
|
||||
@ -891,6 +892,7 @@ begin
|
||||
begin
|
||||
if (passes>1) then
|
||||
begin
|
||||
wposuffix:='_'+tostr(passnr);
|
||||
wpoargs:=' -OW'+config.wpoparas+' -FW'+TestOutputFileName('',PPFile[current],'wp'+tostr(passnr));
|
||||
if (passnr>1) then
|
||||
wpoargs:=wpoargs+' -Ow'+config.wpoparas+' -Fw'+TestOutputFileName('',PPFile[current],'wp'+tostr(passnr-1));
|
||||
@ -899,12 +901,12 @@ begin
|
||||
{ also get the output from as and ld that writes to stderr sometimes }
|
||||
StartTicks:=GetMicroSTicks;
|
||||
{$ifndef macos}
|
||||
execres:=ExecuteRedir(CompilerBin,args+wpoargs,'',CompilerLogFile,'stdout');
|
||||
execres:=ExecuteRedir(CompilerBin,args+wpoargs,'',CompilerLogFile+wposuffix,'stdout');
|
||||
{$else macos}
|
||||
{Due to that Toolserver is not reentrant, we have to asm and link via script.}
|
||||
execres:=ExecuteRedir(CompilerBin,'-s '+args+wpoargs,'',CompilerLogFile,'stdout');
|
||||
execres:=ExecuteRedir(CompilerBin,'-s '+args+wpoargs,'',CompilerLogFile+wposuffix,'stdout');
|
||||
if execres then
|
||||
execres:=ExecuteRedir(TestOutputDir + ':ppas','','',CompilerLogFile,'stdout');
|
||||
execres:=ExecuteRedir(TestOutputDir + ':ppas','','',CompilerLogFile+wpo_suffix,'stdout');
|
||||
{$endif macos}
|
||||
EndTicks:=GetMicroSTicks;
|
||||
Verbose(V_Debug,'Exitcode '+ToStr(ExecuteResult));
|
||||
@ -913,6 +915,8 @@ begin
|
||||
Verbose(V_Normal,'Compilation took '+ToStr(EndTicks-StartTicks)+' us');
|
||||
end;
|
||||
|
||||
if passes > 1 then
|
||||
CopyFile(CompilerLogFile+wposuffix,CompilerLogFile,true);
|
||||
{ Error during execution? }
|
||||
if (not execres) and (ExecuteResult=0) then
|
||||
begin
|
||||
|
Loading…
Reference in New Issue
Block a user