mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-03 02:41:51 +02:00
ide: apply subtarget to packages
This commit is contained in:
parent
8cce4aea69
commit
586aaa6756
@ -538,6 +538,7 @@ begin
|
||||
tr('LCLWidgetType',lisLCLWidgetType);
|
||||
tr('TargetCPU',lisTargetCPU);
|
||||
tr('TargetOS',lisTargetOS);
|
||||
tr('SubTarget',lisSubTarget);
|
||||
tr('SrcOS',lisSrcOS);
|
||||
tr('FPCVer',lisFPCVersionEG222);
|
||||
tr('LAZVer',lisLAZVer);
|
||||
@ -626,6 +627,8 @@ begin
|
||||
Result:=OverrideTargetOS
|
||||
else if SysUtils.CompareText(MacroName,'TargetCPU')=0 then
|
||||
Result:=OverrideTargetCPU
|
||||
else if SysUtils.CompareText(MacroName,'SubTarget')=0 then
|
||||
Result:=OverrideSubTarget
|
||||
else if SysUtils.CompareText(MacroName,'LCLWidgetType')=0 then
|
||||
Result:=OverrideLCLWidgetType;
|
||||
end;
|
||||
@ -637,6 +640,8 @@ begin
|
||||
Result.Values['TargetOS']:=OverrideTargetOS;
|
||||
if OverrideTargetCPU<>'' then
|
||||
Result.Values['TargetCPU']:=OverrideTargetCPU;
|
||||
if OverrideSubTarget<>'' then
|
||||
Result.Values['SubTarget']:=OverrideSubTarget;
|
||||
if OverrideLCLWidgetType<>'' then
|
||||
Result.Values['LCLWidgetType']:=OverrideLCLWidgetType;
|
||||
end;
|
||||
@ -2760,6 +2765,15 @@ function TBuildManager.GetBuildMacroValuesHandler(Options: TBaseCompilerOptions;
|
||||
s:=GetCompiledTargetCPU;
|
||||
end;
|
||||
end;
|
||||
// SubTarget
|
||||
if not Values.IsDefined('SubTarget') then begin
|
||||
s:='';
|
||||
if FBuildTarget<>nil then
|
||||
s:=FBuildTarget.CompilerOptions.SubTarget;
|
||||
if s='' then
|
||||
s:=fSubTarget;
|
||||
Values.Values['SubTarget']:=s;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure ApplyMacroOverrides(Vars: TCTCfgScriptVariables);
|
||||
|
@ -2567,6 +2567,7 @@ var
|
||||
Vars: TCTCfgScriptVariables;
|
||||
CurTargetOS: String;
|
||||
CurTargetCPU: String;
|
||||
CurSubTarget: String;
|
||||
CurSrcOS: String;
|
||||
dit: TCompilerDbgSymbolType;
|
||||
CompilerFilename: String;
|
||||
@ -2623,6 +2624,7 @@ begin
|
||||
|
||||
CurTargetOS:='';
|
||||
CurTargetCPU:='';
|
||||
CurSubTarget:='';
|
||||
if not (ccloNoMacroParams in Flags) then
|
||||
begin
|
||||
Vars:=GetBuildMacroValues(Self,true);
|
||||
@ -2630,6 +2632,7 @@ begin
|
||||
begin
|
||||
CurTargetOS:=GetFPCTargetOS(Vars.Values['TargetOS']);
|
||||
CurTargetCPU:=GetFPCTargetCPU(Vars.Values['TargetCPU']);
|
||||
CurSubTarget:=Vars.Values['SubTarget'];
|
||||
end;
|
||||
end;
|
||||
CurSrcOS:=GetDefaultSrcOSForTargetOS(CurTargetOS);
|
||||
@ -2648,8 +2651,8 @@ begin
|
||||
and ((TargetCPU<>'') or (CurTargetCPU<>DefaultTargetCPU)) then
|
||||
Result.Add('-P' + CurTargetCPU);
|
||||
{ SubTarget }
|
||||
if SubTarget<>'' then
|
||||
Result.Add('-t'+SubTarget);
|
||||
if CurSubTarget<>'' then
|
||||
Result.Add('-t'+CurSubTarget);
|
||||
{ TargetProcessor }
|
||||
if TargetProcessor<>'' then
|
||||
Result.Add('-Cp'+UpperCase(TargetProcessor));
|
||||
|
@ -196,6 +196,7 @@ resourcestring
|
||||
lisLCLWidgetType = 'LCL widget type';
|
||||
lisTargetCPU = 'Target CPU';
|
||||
lisTargetOS = 'Target OS';
|
||||
lisSubTarget = 'SubTarget';
|
||||
lisSrcOS = 'Src OS';
|
||||
lisCommandLineParamsOfProgram = 'Command line parameters of program';
|
||||
lisPromptForValue = 'Prompt for value';
|
||||
|
Loading…
Reference in New Issue
Block a user