From eb4f930af760f05d4c564318d7c152451bb82453 Mon Sep 17 00:00:00 2001 From: mattias Date: Thu, 11 Jul 2013 22:25:50 +0000 Subject: [PATCH] codetools: fixed asking for the default fpc targetos and targetcpu git-svn-id: trunk@42062 - --- components/codetools/definetemplates.pas | 20 ++++++-------------- 1 file changed, 6 insertions(+), 14 deletions(-) diff --git a/components/codetools/definetemplates.pas b/components/codetools/definetemplates.pas index b5d134c666..56cca286f6 100644 --- a/components/codetools/definetemplates.pas +++ b/components/codetools/definetemplates.pas @@ -7137,22 +7137,14 @@ end; function TFPCTargetConfigCache.GetFPCInfoCmdLineOptions(ExtraOptions: string ): string; -var - CurTargetCPU: String; - CurTargetOS: String; begin Result:=CompilerOptions; - // Note: always pass the -P and -T options so that the compiler writes the - // target macros with -va - CurTargetCPU:=TargetCPU; - if CurTargetCPU='' then - CurTargetCPU:=GetCompiledTargetCPU; - Result:=Result+' -P'+LowerCase(CurTargetCPU); - CurTargetOS:=TargetOS; - if CurTargetOS='' then - CurTargetOS:=GetCompiledTargetOS; - Result:=Result+' -T'+LowerCase(CurTargetOS); - Result:=Result+' '+ExtraOptions; + if TargetCPU<>'' then + Result:=Result+' -P'+LowerCase(TargetCPU); + if TargetOS<>'' then + Result:=Result+' -T'+LowerCase(TargetOS); + if ExtraOptions<>'' then + Result:=Result+' '+ExtraOptions; Result:=Trim(Result); end;