codetools: fixed asking for the default fpc targetos and targetcpu

git-svn-id: trunk@42062 -
This commit is contained in:
mattias 2013-07-11 22:25:50 +00:00
parent e304d07dd7
commit eb4f930af7

View File

@ -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;