mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-10-02 02:09:34 +02:00
codetools: always pass the -T and -P option to the compiler to get the macro values
git-svn-id: trunk@31158 -
This commit is contained in:
parent
dcbf3f1a58
commit
68d8948e3c
@ -7576,14 +7576,23 @@ end;
|
|||||||
|
|
||||||
function TFPCTargetConfigCache.GetFPCInfoCmdLineOptions(ExtraOptions: string
|
function TFPCTargetConfigCache.GetFPCInfoCmdLineOptions(ExtraOptions: string
|
||||||
): string;
|
): string;
|
||||||
|
var
|
||||||
|
CurTargetCPU: String;
|
||||||
|
CurTargetOS: String;
|
||||||
begin
|
begin
|
||||||
Result:=CompilerOptions;
|
Result:=CompilerOptions;
|
||||||
if TargetCPU<>'' then
|
// Note: always pass the -P and -T options so that the compiler writes the
|
||||||
Result:=Result+' -P'+LowerCase(TargetCPU);
|
// target macros with -va
|
||||||
if TargetOS<>'' then
|
CurTargetCPU:=TargetCPU;
|
||||||
Result:=Result+' -T'+LowerCase(TargetOS);
|
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;
|
Result:=Result+' '+ExtraOptions;
|
||||||
Result:=Trim(ExtraOptions);
|
Result:=Trim(Result);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TFPCTargetConfigCache.IncreaseChangeStamp;
|
procedure TFPCTargetConfigCache.IncreaseChangeStamp;
|
||||||
|
Loading…
Reference in New Issue
Block a user