fixes for using fpc as compiler executable from Yury Sidorov

git-svn-id: trunk@8919 -
This commit is contained in:
vincents 2006-03-11 15:12:09 +00:00
parent 8248d56504
commit d8952ce6bf
4 changed files with 14 additions and 9 deletions

View File

@ -2784,13 +2784,13 @@ begin
if CompilerOptions<>'' then
CmdLine:=CmdLine+CompilerOptions+' ';
CmdLine:=CmdLine+TestPascalFile;
//DebugLn('TDefinePool.CreateFPCTemplate CmdLine="',CmdLine,'"');
DebugLn('TDefinePool.CreateFPCTemplate CmdLine="',CmdLine,'"');
ShortTestFile:=ExtractFileName(TestPascalFile);
TheProcess := TProcess.Create(nil);
TheProcess.CommandLine := CmdLine;
TheProcess.Options:= [poUsePipes, poNoConsole, poStdErrToOutPut];
TheProcess.ShowWindow := swoNone;
TheProcess.Options:= [poUsePipes, poStdErrToOutPut];
TheProcess.ShowWindow := swoHide;
try
TheProcess.Execute;
OutputLine:='';
@ -2830,8 +2830,8 @@ begin
TheProcess := TProcess.Create(nil);
TheProcess.CommandLine := CmdLine;
TheProcess.Options:= [poUsePipes, poNoConsole, poStdErrToOutPut];
TheProcess.ShowWindow := swoNone;
TheProcess.Options:= [poUsePipes, poStdErrToOutPut];
TheProcess.ShowWindow := swoHide;
try
TheProcess.Execute;
if (TheProcess.Output<>nil) then
@ -2878,8 +2878,8 @@ begin
CmdLine:=CmdLine+' '+CompilerOptions;
CmdLine:=CmdLine+' -iTP';
TheProcess.CommandLine := CmdLine;
TheProcess.Options:= [poUsePipes, poNoConsole, poStdErrToOutPut];
TheProcess.ShowWindow := swoNone;
TheProcess.Options:= [poUsePipes, poStdErrToOutPut];
TheProcess.ShowWindow := swoHide;
try
TheProcess.Execute;
if TheProcess.Output<>nil then

View File

@ -1939,6 +1939,11 @@ Processor specific options:
switches := switches + ' -T' + Globals.TargetOS
else if (TargetOS<>'') then
switches := switches + ' -T' + TargetOS;
{ Target CPU }
if (Globals<>nil) and (Globals.TargetCPU<>'') then
switches := switches + ' -P' + Globals.TargetCPU
else if (TargetCPU<>'') then
switches := switches + ' -P' + TargetCPU;
{ --------------- Linking Tab ------------------- }
{ Debugging }

View File

@ -1598,7 +1598,7 @@ begin
Parent := grpTargetPlatform;
Left := 4;
AnchorVerticalCenterTo(TargetCPUComboBox);
Caption :=dlgTargetCPU+' (-d)';
Caption :=dlgTargetCPU+' (-P)';
end;
Targeti386ProcComboBox:=TComboBox.Create(Self);

View File

@ -10247,7 +10247,7 @@ begin
CurOptions:=AddCmdLineParameter(CurOptions,'-T'+CurTargetOS);
CurTargetCPU:=GetTargetCPU(false);
if CurTargetCPU<>'' then
CurOptions:=AddCmdLineParameter(CurOptions,'-d'+CurTargetCPU);
CurOptions:=AddCmdLineParameter(CurOptions,'-P'+CurTargetCPU);
{$IFDEF VerboseFPCSrcScan}
writeln('TMainIDE.RescanCompilerDefines A ',CurOptions,
' OnlyIfCompilerChanged=',OnlyIfCompilerChanged,