diff --git a/components/codetools/definetemplates.pas b/components/codetools/definetemplates.pas index 6419ec3634..4a0578be5c 100644 --- a/components/codetools/definetemplates.pas +++ b/components/codetools/definetemplates.pas @@ -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 diff --git a/ide/compileroptions.pp b/ide/compileroptions.pp index 9a5e438c68..c8259d58b1 100644 --- a/ide/compileroptions.pp +++ b/ide/compileroptions.pp @@ -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 } diff --git a/ide/compileroptionsdlg.pp b/ide/compileroptionsdlg.pp index caafb45895..ccef462723 100644 --- a/ide/compileroptionsdlg.pp +++ b/ide/compileroptionsdlg.pp @@ -1598,7 +1598,7 @@ begin Parent := grpTargetPlatform; Left := 4; AnchorVerticalCenterTo(TargetCPUComboBox); - Caption :=dlgTargetCPU+' (-d)'; + Caption :=dlgTargetCPU+' (-P)'; end; Targeti386ProcComboBox:=TComboBox.Create(Self); diff --git a/ide/main.pp b/ide/main.pp index 30b339b633..8f05affc7e 100644 --- a/ide/main.pp +++ b/ide/main.pp @@ -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,