ide: fixed SubTarget to Subtarget

This commit is contained in:
mattias 2023-07-26 13:36:12 +01:00
parent dbdec84476
commit 62657fbfd4
15 changed files with 180 additions and 162 deletions

View File

@ -153,7 +153,7 @@ type
private
FOnModified: TNotifyEvent;
fOwner: TObject;
FSubTarget: string;
FSubtarget: string;
SetEmulatedFloatOpcodes: boolean;
function GetDebugInfoTypeStr: String;
procedure SetAllowLabel(const AValue: Boolean);
@ -196,7 +196,7 @@ type
procedure SetSmartLinkUnit(const AValue: Boolean);
procedure SetStackChecks(const AValue: Boolean);
procedure SetStackSize(const AValue: Integer);
procedure SetSubTarget(AValue: string);
procedure SetSubtarget(AValue: string);
procedure SetTypedAddress(const AValue: Boolean);
procedure SetStopAfterErrCount(const AValue: integer);
procedure SetStripSymbols(const AValue: Boolean);
@ -418,7 +418,7 @@ type
property TargetOS: string read fTargetOS write SetTargetOS;
property TargetCPU: string read fTargetCPU write SetTargetCPU; // general type
property TargetProcessor: String read fTargetProc write SetTargetProc; // specific
property SubTarget: string read FSubTarget write SetSubTarget;
property Subtarget: string read FSubtarget write SetSubtarget;
property OptimizationLevel: Integer read fOptLevel write SetOptLevel;
property VariablesInRegisters: Boolean read fVarsInReg write SetVarsInReg;
property UncertainOptimizations: Boolean read fUncertainOpt write SetUncertainOpt;
@ -827,10 +827,10 @@ begin
IncreaseChangeStamp;
end;
procedure TLazCompilerOptions.SetSubTarget(AValue: string);
procedure TLazCompilerOptions.SetSubtarget(AValue: string);
begin
if FSubTarget=AValue then Exit;
FSubTarget:=AValue;
if FSubtarget=AValue then Exit;
FSubtarget:=AValue;
IncreaseChangeStamp;
end;

View File

@ -1172,7 +1172,7 @@ begin
CompilerDefinesCache.TestFilename:=GetTempFilename('fpctest.pas','');
UnitSetCache:=CompilerDefinesCache.FindUnitSet(Config.FPCPath,
Config.TargetOS,Config.TargetProcessor,Config.SubTarget,Config.FPCOptions,Config.FPCSrcDir,
Config.TargetOS,Config.TargetProcessor,Config.Subtarget,Config.FPCOptions,Config.FPCSrcDir,
true);
// parse compiler settings, fpc sources
UnitSetCache.Init;

View File

@ -94,7 +94,7 @@ type
FPPUExt: string;
FProjectDir: string;
FSourceCaches: TFPCSourceCaches;
FSubTarget: string;
FSubtarget: string;
FTargetOS: string;
FTargetProcessor: string;
FTestPascalFile: string;
@ -107,7 +107,7 @@ type
procedure SetModified(const AValue: boolean);
procedure SetPPUExt(const AValue: string);
procedure SetProjectDir(const AValue: string);
procedure SetSubTarget(AValue: string);
procedure SetSubtarget(AValue: string);
procedure SetTargetOS(const AValue: string);
procedure SetTargetProcessor(const AValue: string);
procedure SetTestPascalFile(const AValue: string);
@ -130,7 +130,7 @@ type
property FPCOptions: string read FFPCOptions write SetFPCOptions; // extra options for fpc
property TargetOS: string read FTargetOS write SetTargetOS;
property TargetProcessor: string read FTargetProcessor write SetTargetProcessor;
property SubTarget: string read FSubTarget write SetSubTarget;
property Subtarget: string read FSubtarget write SetSubtarget;
property TestPascalFile: string read FTestPascalFile write SetTestPascalFile; // points to an empty unit
property PPUExt: string read FPPUExt write SetPPUExt;
property SourceCaches: TFPCSourceCaches read FSourceCaches;
@ -220,10 +220,10 @@ begin
Modified:=true;
end;
procedure TCodeToolsOptions.SetSubTarget(AValue: string);
procedure TCodeToolsOptions.SetSubtarget(AValue: string);
begin
if FSubTarget=AValue then Exit;
FSubTarget:=AValue;
if FSubtarget=AValue then Exit;
FSubtarget:=AValue;
Modified:=true;
end;
@ -287,7 +287,7 @@ begin
if GetEnvironmentVariableUTF8('FPCTARGETCPU')<>'' then
TargetProcessor:=GetEnvironmentVariableUTF8('FPCTARGETCPU');
if GetEnvironmentVariableUTF8('FPCSUBTARGET')<>'' then
SubTarget:=GetEnvironmentVariableUTF8('FPCSUBTARGET');
Subtarget:=GetEnvironmentVariableUTF8('FPCSUBTARGET');
end;
function TCodeToolsOptions.FindDefaultCompilerFilename: string;
@ -304,7 +304,7 @@ begin
XMLConfig.SetDeleteValue(Path+'FPC/SrcDir/Value',FPCSrcDir,'');
XMLConfig.SetDeleteValue(Path+'FPC/TargetOS/Value',TargetOS,'');
XMLConfig.SetDeleteValue(Path+'FPC/TargetProcessor/Value',TargetProcessor,'');
XMLConfig.SetDeleteValue(Path+'FPC/SubTarget/Value',SubTarget,'');
XMLConfig.SetDeleteValue(Path+'FPC/Subtarget/Value',Subtarget,'');
XMLConfig.SetDeleteValue(Path+'FPC/PPUExt/Value',PPUExt,'.ppu');
XMLConfig.SetDeleteValue(Path+'FPC/TestPascalFile/Value',TestPascalFile,'');
XMLConfig.SetDeleteValue(Path+'Lazarus/SrcDir/Value',LazarusSrcDir,'');
@ -324,7 +324,7 @@ begin
FPCSrcDir:=XMLConfig.GetValue(Path+'FPC/SrcDir/Value','');
TargetOS:=XMLConfig.GetValue(Path+'FPC/TargetOS/Value','');
TargetProcessor:=XMLConfig.GetValue(Path+'FPC/TargetProcessor/Value','');
SubTarget:=XMLConfig.GetValue(Path+'FPC/SubTarget/Value','');
Subtarget:=XMLConfig.GetValue(Path+'FPC/Subtarget/Value','');
PPUExt:=XMLConfig.GetValue(Path+'FPC/PPUExt/Value','.ppu');
TestPascalFile:=XMLConfig.GetValue(Path+'FPC/TestPascalFile/Value','');
FConfigCaches.LoadFromXMLConfig(XMLConfig,Path+'FPCConfigCaches/');

View File

@ -837,7 +837,7 @@ type
// key
TargetOS: string; // will be passed lowercase
TargetCPU: string; // will be passed lowercase
SubTarget: string; // will be passed lowercase
Subtarget: string; // will be passed lowercase
Compiler: string; // full file name
CompilerOptions: string; // e.g. -V<version> -Xp<path>
// values
@ -912,7 +912,7 @@ type
CreateIfNotExists: boolean): TPCTargetConfigCache;
function Find(CompilerFilename, CompilerOptions, TargetOS, TargetCPU: string;
CreateIfNotExists: boolean): TPCTargetConfigCache;
function Find(CompilerFilename, CompilerOptions, TargetOS, TargetCPU, SubTarget: string;
function Find(CompilerFilename, CompilerOptions, TargetOS, TargetCPU, Subtarget: string;
CreateIfNotExists: boolean): TPCTargetConfigCache;
procedure GetDefaultCompilerTarget(const CompilerFilename,CompilerOptions: string;
out TargetOS, TargetCPU: string);
@ -996,7 +996,7 @@ type
fSourceCache: TFPCSourceCache;
fSourceRules: TFPCSourceRules;
fSrcDuplicates: TStringToStringTree; // unit to list of files (semicolon separated)
FSubTarget: string;
FSubtarget: string;
FTargetCPU: string;
FTargetOS: string;
fUnitStampOfFiles: integer; // fSourceCache.ChangeStamp at creation of fUnitToSourceTree
@ -1006,7 +1006,7 @@ type
procedure SetCompilerFilename(const AValue: string);
procedure SetCompilerOptions(const AValue: string);
procedure SetFPCSourceDirectory(const AValue: string);
procedure SetSubTarget(AValue: string);
procedure SetSubtarget(AValue: string);
procedure SetTargetCPU(const AValue: string);
procedure SetTargetOS(const AValue: string);
procedure ClearConfigCache;
@ -1024,7 +1024,7 @@ type
property CompilerOptions: string read FCompilerOptions write SetCompilerOptions;
property TargetOS: string read FTargetOS write SetTargetOS; // case insensitive, will be passed lowercase
property TargetCPU: string read FTargetCPU write SetTargetCPU; // case insensitive, will be passed lowercase
property SubTarget: string read FSubTarget write SetSubTarget; // case insensitive, will be passed lowercase
property Subtarget: string read FSubtarget write SetSubtarget; // case insensitive, will be passed lowercase
property FPCSourceDirectory: string read FFPCSourceDirectory write SetFPCSourceDirectory;
function GetConfigCache(AutoUpdate: boolean): TPCTargetConfigCache;
function GetSourceCache(AutoUpdate: boolean): TFPCSourceCache;
@ -1081,15 +1081,15 @@ type
function FindUnitSet(const CompilerFilename, TargetOS, TargetCPU,
Options, FPCSrcDir: string;
CreateIfNotExists: boolean): TFPCUnitSetCache;
function FindUnitSet(const CompilerFilename, TargetOS, TargetCPU, SubTarget,
function FindUnitSet(const CompilerFilename, TargetOS, TargetCPU, Subtarget,
Options, FPCSrcDir: string;
CreateIfNotExists: boolean): TFPCUnitSetCache;
function FindUnitSetWithID(const UnitSetID: string; out Changed: boolean;
CreateIfNotExists: boolean): TFPCUnitSetCache;
function GetUnitSetID(CompilerFilename, TargetOS, TargetCPU, SubTarget, Options,
function GetUnitSetID(CompilerFilename, TargetOS, TargetCPU, Subtarget, Options,
FPCSrcDir: string; ChangeStamp: integer): string;
procedure ParseUnitSetID(const ID: string; out CompilerFilename,
TargetOS, TargetCPU, SubTarget, Options, FPCSrcDir: string;
TargetOS, TargetCPU, Subtarget, Options, FPCSrcDir: string;
out ChangeStamp: integer);
end;
@ -1109,7 +1109,7 @@ function GetDefaultCompilerFilename(const TargetCPU: string = ''; Cross: boolean
procedure GetTargetProcessors(const TargetCPU: string; aList: TStrings);
function GetFPCTargetOS(TargetOS: string): string; // normalize
function GetFPCTargetCPU(TargetCPU: string): string; // normalize
function GetFPCSubTarget(SubTarget: string): string; // normalize
function GetFPCSubtarget(Subtarget: string): string; // normalize
function IsPas2jsTargetOS(TargetOS: string): boolean;
function IsPas2jsTargetCPU(TargetCPU: string): boolean;
@ -3594,7 +3594,7 @@ begin
if Result<>0 then exit;
Result:=CompareText(Item1.TargetCPU,Item2.TargetCPU);
if Result<>0 then exit;
Result:=CompareText(Item1.SubTarget,Item2.SubTarget);
Result:=CompareText(Item1.Subtarget,Item2.Subtarget);
if Result<>0 then exit;
Result:=CompareFilenames(Item1.Compiler,Item2.Compiler);
if Result<>0 then exit;
@ -3953,9 +3953,9 @@ begin
Result:=LowerCase(TargetCPU);
end;
function GetFPCSubTarget(SubTarget: string): string;
function GetFPCSubtarget(Subtarget: string): string;
begin
Result:=LowerCase(SubTarget);
Result:=LowerCase(Subtarget);
end;
function IsPas2jsTargetOS(TargetOS: string): boolean;
@ -9769,7 +9769,7 @@ begin
if CompareKey then begin
if (not SameText(TargetOS,Item.TargetOS))
or (not SameText(TargetCPU,Item.TargetCPU))
or (not SameText(SubTarget,Item.SubTarget))
or (not SameText(Subtarget,Item.Subtarget))
or (Compiler<>Item.Compiler)
or (CompilerOptions<>Item.CompilerOptions)
then
@ -9865,7 +9865,7 @@ begin
// keys
TargetOS:=Item.TargetOS;
TargetCPU:=Item.TargetCPU;
SubTarget:=Item.SubTarget;
Subtarget:=Item.Subtarget;
Compiler:=Item.Compiler;
CompilerOptions:=Item.CompilerOptions;
// values
@ -10017,7 +10017,7 @@ begin
Kind:=StrToPascalCompiler(XMLConfig.GetValue(Path+'Kind',PascalCompilerNames[pcFPC]));
TargetOS:=XMLConfig.GetValue(Path+'TargetOS','');
TargetCPU:=XMLConfig.GetValue(Path+'TargetCPU','');
SubTarget:=XMLConfig.GetValue(Path+'SubTarget','');
Subtarget:=XMLConfig.GetValue(Path+'Subtarget','');
Compiler:=XMLConfig.GetValue(Path+'Compiler/File','');
CompilerOptions:=XMLConfig.GetValue(Path+'Compiler/Options','');
CompilerDate:=XMLConfig.GetValue(Path+'Compiler/Date',0);
@ -10203,7 +10203,7 @@ begin
XMLConfig.SetDeleteValue(Path+'Kind',PascalCompilerNames[Kind],PascalCompilerNames[pcFPC]);
XMLConfig.SetDeleteValue(Path+'TargetOS',TargetOS,'');
XMLConfig.SetDeleteValue(Path+'TargetCPU',TargetCPU,'');
XMLConfig.SetDeleteValue(Path+'SubTarget',SubTarget,'');
XMLConfig.SetDeleteValue(Path+'Subtarget',Subtarget,'');
XMLConfig.SetDeleteValue(Path+'Compiler/File',Compiler,'');
XMLConfig.SetDeleteValue(Path+'Compiler/Options',CompilerOptions,'');
XMLConfig.SetDeleteValue(Path+'Compiler/Date',CompilerDate,0);
@ -10322,7 +10322,7 @@ function TPCTargetConfigCache.NeedsUpdate: boolean;
procedure DebugMissing(const Msg: string);
begin
if CTConsoleVerbosity>0 then
debugln(['Hint: [TPCTargetConfigCache.NeedsUpdate] TargetOS="',TargetOS,'" TargetCPU="',TargetCPU,'" SubTarget="',SubTarget,'" Options="',CompilerOptions,'" ',Msg]);
debugln(['Hint: [TPCTargetConfigCache.NeedsUpdate] TargetOS="',TargetOS,'" TargetCPU="',TargetCPU,'" Subtarget="',Subtarget,'" Options="',CompilerOptions,'" ',Msg]);
end;
var
@ -10378,8 +10378,8 @@ begin
Result:=Result+' -P'+LowerCase(TargetCPU);
if TargetOS<>'' then
Result:=Result+' -T'+LowerCase(TargetOS);
if SubTarget<>'' then
Result:=Result+' -t'+LowerCase(SubTarget);
if Subtarget<>'' then
Result:=Result+' -t'+LowerCase(Subtarget);
if ExtraOptions<>'' then
Result:=Result+' '+ExtraOptions;
Result:=Trim(Result);
@ -10425,11 +10425,11 @@ begin
Clear;
if CTConsoleVerbosity>0 then
debugln(['Hint: [TPCTargetConfigCache.Update] ',Compiler,' TargetOS=',TargetOS,' TargetCPU=',TargetCPU,' SubTarget=',SubTarget,' CompilerOptions=',CompilerOptions,' ExtraOptions=',ExtraOptions,' PATH=',GetEnvironmentVariableUTF8('PATH')]);
debugln(['Hint: [TPCTargetConfigCache.Update] ',Compiler,' TargetOS=',TargetOS,' TargetCPU=',TargetCPU,' Subtarget=',Subtarget,' CompilerOptions=',CompilerOptions,' ExtraOptions=',ExtraOptions,' PATH=',GetEnvironmentVariableUTF8('PATH')]);
CompilerDate:=-1;
if FileExistsCached(Compiler) then begin
CompilerDate:=FileAgeCached(Compiler);
ExtraOptions:=GetFPCInfoCmdLineOptions(ExtraOptions);// add -PTargetCPU -TTargetOS -tSubTarget
ExtraOptions:=GetFPCInfoCmdLineOptions(ExtraOptions);// add -PTargetCPU -TTargetOS -tSubtarget
BaseDir:='';
// check if this is a FPC compatible compiler and get version, OS and CPU
@ -10811,7 +10811,7 @@ begin
end;
function TPCTargetConfigCaches.Find(CompilerFilename, CompilerOptions,
TargetOS, TargetCPU, SubTarget: string; CreateIfNotExists: boolean
TargetOS, TargetCPU, Subtarget: string; CreateIfNotExists: boolean
): TPCTargetConfigCache;
var
Node: TAVLTreeNode;
@ -10823,7 +10823,7 @@ begin
Cmp.CompilerOptions:=CompilerOptions;
Cmp.TargetOS:=TargetOS;
Cmp.TargetCPU:=TargetCPU;
Cmp.SubTarget:=SubTarget;
Cmp.Subtarget:=Subtarget;
Node:=fItems.Find(cmp);
if Node<>nil then begin
Result:=TPCTargetConfigCache(Node.Data);
@ -11485,7 +11485,7 @@ begin
end;
function TCompilerDefinesCache.FindUnitSet(const CompilerFilename, TargetOS,
TargetCPU, SubTarget, Options, FPCSrcDir: string; CreateIfNotExists: boolean
TargetCPU, Subtarget, Options, FPCSrcDir: string; CreateIfNotExists: boolean
): TFPCUnitSetCache;
var
i: Integer;
@ -11495,7 +11495,7 @@ begin
if (CompareFilenames(Result.CompilerFilename,CompilerFilename)=0)
and (SysUtils.CompareText(Result.TargetOS,TargetOS)=0)
and (SysUtils.CompareText(Result.TargetCPU,TargetCPU)=0)
and (SysUtils.CompareText(Result.SubTarget,SubTarget)=0)
and (SysUtils.CompareText(Result.Subtarget,Subtarget)=0)
and (CompareFilenames(Result.FPCSourceDirectory,FPCSrcDir)=0)
and (Result.CompilerOptions=Options)
then
@ -11507,7 +11507,7 @@ begin
Result.CompilerOptions:=Options;
Result.TargetOS:=TargetOS;
Result.TargetCPU:=TargetCPU;
Result.SubTarget:=SubTarget;
Result.Subtarget:=Subtarget;
Result.FPCSourceDirectory:=FPCSrcDir;
fUnitToSrcCaches.Add(Result);
end else
@ -11517,26 +11517,26 @@ end;
function TCompilerDefinesCache.FindUnitSetWithID(const UnitSetID: string; out
Changed: boolean; CreateIfNotExists: boolean): TFPCUnitSetCache;
var
CompilerFilename, TargetOS, TargetCPU, SubTarget, Options, FPCSrcDir: string;
CompilerFilename, TargetOS, TargetCPU, Subtarget, Options, FPCSrcDir: string;
ChangeStamp: integer;
begin
ParseUnitSetID(UnitSetID,CompilerFilename, TargetOS, TargetCPU, SubTarget,
ParseUnitSetID(UnitSetID,CompilerFilename, TargetOS, TargetCPU, Subtarget,
Options, FPCSrcDir, ChangeStamp);
//debugln(['TCompilerDefinesCache.FindUnitToSrcCache UnitSetID="',dbgstr(UnitSetID),'" CompilerFilename="',CompilerFilename,'" TargetOS="',TargetOS,'" TargetCPU="',TargetCPU,'" Options="',Options,'" FPCSrcDir="',FPCSrcDir,'" ChangeStamp=',ChangeStamp,' exists=',FindUnitToSrcCache(CompilerFilename, TargetOS, TargetCPU,Options, FPCSrcDir,false)<>nil]);
Result:=FindUnitSet(CompilerFilename, TargetOS, TargetCPU, SubTarget,
Result:=FindUnitSet(CompilerFilename, TargetOS, TargetCPU, Subtarget,
Options, FPCSrcDir, false);
if Result<>nil then begin
Changed:=ChangeStamp<>Result.ChangeStamp;
end else if CreateIfNotExists then begin
Changed:=true;
Result:=FindUnitSet(CompilerFilename, TargetOS, TargetCPU, SubTarget,
Result:=FindUnitSet(CompilerFilename, TargetOS, TargetCPU, Subtarget,
Options, FPCSrcDir, true);
end else
Changed:=false;
end;
function TCompilerDefinesCache.GetUnitSetID(CompilerFilename, TargetOS,
TargetCPU, SubTarget, Options, FPCSrcDir: string; ChangeStamp: integer
TargetCPU, Subtarget, Options, FPCSrcDir: string; ChangeStamp: integer
): string;
procedure Add(const aName, aValue: string);
@ -11550,14 +11550,14 @@ begin
Add('CompilerFilename',CompilerFilename);
Add('TargetOS',TargetOS);
Add('TargetCPU',TargetCPU);
Add('SubTarget',SubTarget);
Add('Subtarget',Subtarget);
Add('Options',Options);
Add('FPCSrcDir',FPCSrcDir);
Add('Stamp',IntToStr(ChangeStamp));
end;
procedure TCompilerDefinesCache.ParseUnitSetID(const ID: string; out
CompilerFilename, TargetOS, TargetCPU, SubTarget, Options, FPCSrcDir: string;
CompilerFilename, TargetOS, TargetCPU, Subtarget, Options, FPCSrcDir: string;
out ChangeStamp: integer);
var
NameStartPos: PChar;
@ -11582,7 +11582,7 @@ begin
CompilerFilename:='';
TargetCPU:='';
TargetOS:='';
SubTarget:='';
Subtarget:='';
Options:='';
FPCSrcDir:='';
ChangeStamp:=0;
@ -11612,8 +11612,8 @@ begin
's','S':
if NameFits('Stamp') then
ChangeStamp:=StrToIntDef(Value,0)
else if NameFits('SubTarget') then
SubTarget:=Value;
else if NameFits('Subtarget') then
Subtarget:=Value;
't','T':
if NameFits('TargetOS') then
TargetOS:=Value
@ -11653,10 +11653,10 @@ begin
ClearSourceCache;
end;
procedure TFPCUnitSetCache.SetSubTarget(AValue: string);
procedure TFPCUnitSetCache.SetSubtarget(AValue: string);
begin
if FSubTarget=AValue then Exit;
FSubTarget:=AValue;
if FSubtarget=AValue then Exit;
FSubtarget:=AValue;
ClearConfigCache;
end;
@ -11938,7 +11938,7 @@ end;
function TFPCUnitSetCache.GetUnitSetID: string;
begin
Result:=Caches.GetUnitSetID(CompilerFilename,TargetOS,TargetCPU,SubTarget,
Result:=Caches.GetUnitSetID(CompilerFilename,TargetOS,TargetCPU,Subtarget,
CompilerOptions,FPCSourceDirectory,ChangeStamp);
end;

View File

@ -56,7 +56,7 @@ type
function GetBuildMacroOverrides: TStrings; virtual; abstract;
function GetTargetOS: string; virtual; abstract;
function GetTargetCPU: string; virtual; abstract;
function GetSubTarget: string; virtual; abstract;
function GetSubtarget: string; virtual; abstract;
function GetLCLWidgetType: string; virtual; abstract;
function GetRunCommandLine: string; virtual; abstract;
function GetRunWorkingDir: string; virtual; abstract;

View File

@ -86,7 +86,7 @@ type
// current target
fTargetOS: string;
fTargetCPU: string;
fSubTarget: string;
fSubtarget: string;
fLCLWidgetType: string;
// cache
FFPCompilerFilename: string;
@ -149,7 +149,7 @@ type
var {%H-}Abort: boolean): string;
function MacroFuncSrcOS(const {%H-}Param: string; const Data: PtrInt;
var {%H-}Abort: boolean): string;
function MacroFuncSubTarget(const {%H-}Param: string; const Data: PtrInt;
function MacroFuncSubtarget(const {%H-}Param: string; const Data: PtrInt;
var {%H-}Abort: boolean): string;
function MacroFuncTargetCmdLine(const {%H-}Param: string; const {%H-}Data: PtrInt;
var {%H-}Abort: boolean): string;
@ -181,7 +181,7 @@ type
// command line overrides
OverrideTargetOS: string;
OverrideTargetCPU: string;
OverrideSubTarget: string;
OverrideSubtarget: string;
OverrideLCLWidgetType: string;
DefaultCfgVars: TCTCfgScriptVariables;
DefaultCfgVarsBuildMacroStamp: integer;
@ -210,7 +210,7 @@ type
function GetBuildMacroOverrides: TStrings; override;
function GetTargetOS: string; override;
function GetTargetCPU: string; override;
function GetSubTarget: string; override;
function GetSubtarget: string; override;
function GetLCLWidgetType: string; override;
function GetRunCommandLine: string; override;
function GetRunWorkingDir: string; override;
@ -255,7 +255,7 @@ type
function UpdateProjectAutomaticFiles(TestDir: string): TModalResult; override;
// methods for building IDE (will be changed when project groups are there)
procedure SetBuildTarget(const TargetOS, TargetCPU, SubTarget, LCLWidgetType: string;
procedure SetBuildTarget(const TargetOS, TargetCPU, Subtarget, LCLWidgetType: string;
ScanFPCSrc: TScanModeFPCSources; Quiet: boolean);
procedure SetBuildTargetProject1; override; overload;
procedure SetBuildTargetProject1(Quiet: boolean; ScanFPCSrc: TScanModeFPCSources = smsfsBackground); overload;
@ -449,8 +449,8 @@ begin
lisTargetCPU,@MacroFuncTargetCPU,[]));
GlobalMacroList.Add(TTransferMacro.Create('TargetOS','',
lisTargetOS,@MacroFuncTargetOS,[]));
GlobalMacroList.Add(TTransferMacro.Create('SubTarget','',
lisTargetCPU,@MacroFuncSubTarget,[]));
GlobalMacroList.Add(TTransferMacro.Create('Subtarget','',
lisTargetCPU,@MacroFuncSubtarget,[]));
GlobalMacroList.Add(TTransferMacro.Create('SrcOS','',
lisSrcOS,@MacroFuncSrcOS,[]));
GlobalMacroList.Add(TTransferMacro.Create('CompPath','',
@ -538,7 +538,7 @@ begin
tr('LCLWidgetType',lisLCLWidgetType);
tr('TargetCPU',lisTargetCPU);
tr('TargetOS',lisTargetOS);
tr('SubTarget',lisSubTarget);
tr('Subtarget',lisSubtarget);
tr('SrcOS',lisSrcOS);
tr('FPCVer',lisFPCVersionEG222);
tr('LAZVer',lisLAZVer);
@ -627,8 +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,'Subtarget')=0 then
Result:=OverrideSubtarget
else if SysUtils.CompareText(MacroName,'LCLWidgetType')=0 then
Result:=OverrideLCLWidgetType;
end;
@ -640,8 +640,8 @@ begin
Result.Values['TargetOS']:=OverrideTargetOS;
if OverrideTargetCPU<>'' then
Result.Values['TargetCPU']:=OverrideTargetCPU;
if OverrideSubTarget<>'' then
Result.Values['SubTarget']:=OverrideSubTarget;
if OverrideSubtarget<>'' then
Result.Values['Subtarget']:=OverrideSubtarget;
if OverrideLCLWidgetType<>'' then
Result.Values['LCLWidgetType']:=OverrideLCLWidgetType;
end;
@ -657,9 +657,9 @@ begin
//debugln(['TBuildManager.GetTargetCPU ',Result]);
end;
function TBuildManager.GetSubTarget: string;
function TBuildManager.GetSubtarget: string;
begin
Result:=fSubTarget;
Result:=fSubtarget;
end;
function TBuildManager.GetLCLWidgetType: string;
@ -997,7 +997,7 @@ procedure TBuildManager.RescanCompilerDefines(ResetBuildTarget,
end;
var
TargetOS, TargetCPU, SubTarget, FPCOptions: string;
TargetOS, TargetCPU, Subtarget, FPCOptions: string;
CompilerFilename: String;
FPCSrcDir: string;
ADefTempl: TDefineTemplate;
@ -1030,7 +1030,7 @@ begin
// use current TargetOS, TargetCPU, compilerfilename and FPC source dir
TargetOS:=GetTargetOS;
TargetCPU:=GetTargetCPU;
SubTarget:=GetSubTarget;
Subtarget:=GetSubtarget;
{$IFDEF VerboseFPCSrcScan}
debugln(['TBuildManager.RescanCompilerDefines GetParsedFPCSourceDirectory needs FPCVer...']);
{$ENDIF}
@ -1045,7 +1045,7 @@ begin
' Kind=',PascalCompilerNames[CompilerKind],
' TargetOS=',TargetOS,
' TargetCPU=',TargetCPU,
' SubTarget=',SubTarget,
' Subtarget=',Subtarget,
' FPCOptions="',FPCOptions,'"',
' EnvFPCSrcDir=',EnvironmentOptions.FPCSourceDirectory,
' FPCSrcDir=',FPCSrcDir,
@ -1106,9 +1106,9 @@ begin
{$IFDEF VerboseFPCSrcScan}
debugln(['TBuildManager.RescanCompilerDefines reading active compiler settings']);
{$ENDIF}
//debugln(['TBuildManager.RescanCompilerDefines ',CompilerFilename,' OS=',TargetOS,' CPU=',TargetCPU,' SubTarget=',SubTarget,' Options="',FPCOptions,'"']);
//debugln(['TBuildManager.RescanCompilerDefines ',CompilerFilename,' OS=',TargetOS,' CPU=',TargetCPU,' Subtarget=',Subtarget,' Options="',FPCOptions,'"']);
UnitSetCache:=CodeToolBoss.CompilerDefinesCache.FindUnitSet(
CompilerFilename,TargetOS,TargetCPU,SubTarget,FPCOptions,FPCSrcDir,true);
CompilerFilename,TargetOS,TargetCPU,Subtarget,FPCOptions,FPCSrcDir,true);
NeedUpdateFPCSrcCache:=false;
//debugln(['TBuildManager.RescanCompilerDefines ',DirectoryExistsUTF8(FPCSrcDir),' ',(not WaitTillDone),' ',(not HasGUI)]);
@ -1143,7 +1143,7 @@ begin
' CompilerFilename=',CompilerFilename,
' TargetOS=',TargetOS,
' TargetCPU=',TargetCPU,
' SubTarget=',SubTarget,
' Subtarget=',Subtarget,
' FPCOptions="',FPCOptions,'"',
' RealCompiler=',UnitSetCache.GetConfigCache(false).RealCompiler,
' EnvFPCSrcDir=',EnvironmentOptions.FPCSourceDirectory,
@ -1223,8 +1223,8 @@ begin
// check if at least one fpc config is there
if (UnitSetCache.GetFirstFPCCfg='') then begin
IgnorePath:='MissingFPCCfg_'+TargetOS+'-'+TargetCPU;
if SubTarget<>'' then
IgnorePath+='-'+SubTarget;
if Subtarget<>'' then
IgnorePath+='-'+Subtarget;
if (InputHistories<>nil) and (InputHistories.Ignores.Find(IgnorePath)=nil)
then begin
MsgResult:=IDEMessageDialog(lisCCOWarningCaption,
@ -2305,7 +2305,7 @@ begin
Result:=GetDefaultSrcOSForTargetOS(GetTargetOS);
end;
function TBuildManager.MacroFuncSubTarget(const Param: string;
function TBuildManager.MacroFuncSubtarget(const Param: string;
const Data: PtrInt; var Abort: boolean): string;
begin
if Data=CompilerOptionMacroPlatformIndependent then
@ -2313,7 +2313,7 @@ begin
else if SysUtils.CompareText(Param,'IDE')=0 then
Result:=''
else
Result:=GetSubTarget;
Result:=GetSubtarget;
end;
function TBuildManager.MacroFuncFPCVer(const Param: string; const Data: PtrInt;
@ -2765,14 +2765,14 @@ function TBuildManager.GetBuildMacroValuesHandler(Options: TBaseCompilerOptions;
s:=GetCompiledTargetCPU;
end;
end;
// SubTarget
if not Values.IsDefined('SubTarget') then begin
// Subtarget
if not Values.IsDefined('Subtarget') then begin
s:='';
if FBuildTarget<>nil then
s:=FBuildTarget.CompilerOptions.SubTarget;
s:=FBuildTarget.CompilerOptions.Subtarget;
if s='' then
s:=fSubTarget;
Values.Values['SubTarget']:=s;
s:=fSubtarget;
Values.Values['Subtarget']:=s;
end;
end;
@ -2955,7 +2955,7 @@ begin
Result:=not Project1.BuildModes.IsSessionMode(Identifier);
end;
procedure TBuildManager.SetBuildTarget(const TargetOS, TargetCPU, SubTarget,
procedure TBuildManager.SetBuildTarget(const TargetOS, TargetCPU, Subtarget,
LCLWidgetType: string; ScanFPCSrc: TScanModeFPCSources; Quiet: boolean);
function GetEffectiveLCLWidgetType: string;
@ -2974,7 +2974,7 @@ procedure TBuildManager.SetBuildTarget(const TargetOS, TargetCPU, SubTarget,
var
OldTargetOS: String;
OldTargetCPU: String;
OldSubTarget: String;
OldSubtarget: String;
OldLCLWidgetType: String;
PCTargetChanged: Boolean;
LCLTargetChanged: Boolean;
@ -2983,15 +2983,15 @@ var
CompQueryOptions, CompilerFilename: String;
begin
{$IFDEF VerboseDefaultCompilerTarget}
debugln(['TBuildManager.SetBuildTarget TargetOS="',TargetOS,'" TargetCPU="',TargetCPU,'" SubTarget="',SubTarget,'" LCLWidgetType="',LCLWidgetType,'"']);
debugln(['TBuildManager.SetBuildTarget TargetOS="',TargetOS,'" TargetCPU="',TargetCPU,'" Subtarget="',Subtarget,'" LCLWidgetType="',LCLWidgetType,'"']);
{$ENDIF}
OldTargetOS:=fTargetOS;
OldTargetCPU:=fTargetCPU;
OldSubTarget:=fSubTarget;
OldSubtarget:=fSubtarget;
OldLCLWidgetType:=fLCLWidgetType;
OverrideTargetOS:=GetFPCTargetOS(TargetOS);
OverrideTargetCPU:=GetFPCTargetCPU(TargetCPU);
OverrideSubTarget:=GetFPCSubTarget(SubTarget);
OverrideSubtarget:=GetFPCSubtarget(Subtarget);
OverrideLCLWidgetType:=lowercase(LCLWidgetType);
// compute new TargetOS
@ -3014,15 +3014,15 @@ begin
if SysUtils.CompareText(fTargetCPU,'default')=0 then
fTargetCPU:='';
// compute new SubTarget
if OverrideSubTarget<>'' then
fSubTarget:=OverrideSubTarget
// compute new Subtarget
if OverrideSubtarget<>'' then
fSubtarget:=OverrideSubtarget
else if FBuildTarget<>nil then
fSubTarget:=FBuildTarget.CompilerOptions.SubTarget
fSubtarget:=FBuildTarget.CompilerOptions.Subtarget
else
fSubTarget:='';
if SysUtils.CompareText(fSubTarget,'default')=0 then
fSubTarget:='';
fSubtarget:='';
if SysUtils.CompareText(fSubtarget,'default')=0 then
fSubtarget:='';
if (fTargetOS='') or (fTargetCPU='') then
begin
@ -3059,7 +3059,7 @@ begin
PCTargetChanged:=(OldTargetOS<>fTargetOS)
or (OldTargetCPU<>fTargetCPU)
or (OldSubTarget<>fSubTarget)
or (OldSubtarget<>fSubtarget)
or (CodeToolBoss.DefineTree.FindDefineTemplateByName(
StdDefTemplLazarusSources,true)=nil);
if PCTargetChanged then
@ -3075,8 +3075,8 @@ begin
if PCTargetChanged or LCLTargetChanged then begin
if ConsoleVerbosity>=0 then
DebugLn(['Hint: (lazarus) [TBuildManager.SetBuildTarget]',
' Old=',OldTargetCPU,'-',OldTargetOS,'-',OldSubTarget,'-',OldLCLWidgetType,
' New=',fTargetCPU,'-',fTargetOS,'-',fSubTarget,'-',fLCLWidgetType,
' Old=',OldTargetCPU,'-',OldTargetOS,'-',OldSubtarget,'-',OldLCLWidgetType,
' New=',fTargetCPU,'-',fTargetOS,'-',fSubtarget,'-',fLCLWidgetType,
' Changed: OS/CPU=',PCTargetChanged,' LCL=',LCLTargetChanged]);
end;
if LCLTargetChanged then
@ -3107,19 +3107,19 @@ procedure TBuildManager.SetBuildTargetIDE(aQuiet: boolean);
var
NewTargetOS: String;
NewTargetCPU: String;
NewLCLWidgetSet, NewSubTarget: String;
NewLCLWidgetSet, NewSubtarget: String;
begin
//debugln(['TBuildManager.SetBuildTargetIDE START']);
FBuildTarget:=nil;
with MiscellaneousOptions do begin
NewTargetOS:=BuildLazOpts.TargetOS;
NewTargetCPU:=BuildLazOpts.TargetCPU;
NewSubTarget:=BuildLazOpts.SubTarget;
NewSubtarget:=BuildLazOpts.Subtarget;
NewLCLWidgetSet:=LCLPlatformDirNames[BuildLazOpts.TargetPlatform];
end;
if ConsoleVerbosity>=1 then
debugln(['Hint: (lazarus) [TBuildManager.SetBuildTargetIDE] OS=',NewTargetOS,' CPU=',NewTargetCPU,' SubTarget=',NewSubTarget,' WS=',NewLCLWidgetSet]);
SetBuildTarget(NewTargetOS,NewTargetCPU,NewSubTarget,NewLCLWidgetSet,smsfsBackground,aQuiet);
debugln(['Hint: (lazarus) [TBuildManager.SetBuildTargetIDE] OS=',NewTargetOS,' CPU=',NewTargetCPU,' Subtarget=',NewSubtarget,' WS=',NewLCLWidgetSet]);
SetBuildTarget(NewTargetOS,NewTargetCPU,NewSubtarget,NewLCLWidgetSet,smsfsBackground,aQuiet);
end;
function TBuildManager.BuildTargetIDEIsDefault: boolean;

View File

@ -63,7 +63,7 @@ type
FCleanOnce: boolean;
fOwnerCnt: TBuildLazarusProfiles;
fName: string;
FSubTarget: string;
FSubtarget: string;
fTargetOS: string;
fTargetDirectory: string;
fTargetCPU: string;
@ -90,7 +90,7 @@ type
property TargetOS: string read fTargetOS write fTargetOS;
property TargetDirectory: string read fTargetDirectory write fTargetDirectory;
property TargetCPU: string read fTargetCPU write fTargetCPU;
property SubTarget: string read FSubTarget write FSubTarget;
property Subtarget: string read FSubtarget write FSubtarget;
property TargetPlatform: TLCLPlatform read fTargetPlatform write fTargetPlatform;
property IdeBuildMode: TIdeBuildMode read fIdeBuildMode write fIdeBuildMode;
property CleanOnce: boolean read FCleanOnce write FCleanOnce;
@ -221,7 +221,7 @@ var
begin
TargetOS :=XMLConfig.GetValue(Path+'TargetOS/Value','');
TargetCPU :=XMLConfig.GetValue(Path+'TargetCPU/Value','');
SubTarget :=XMLConfig.GetValue(Path+'SubTarget/Value','');
Subtarget :=XMLConfig.GetValue(Path+'Subtarget/Value','');
LCLPlatformStr:=XMLConfig.GetValue(Path+'LCLPlatform/Value','');
if LCLPlatformStr='' then
fTargetPlatform:=GetDefaultLCLWidgetType
@ -242,7 +242,7 @@ procedure TBuildLazarusProfile.Save(XMLConfig: TXMLConfig; const Path: string);
begin
XMLConfig.SetDeleteValue(Path+'TargetOS/Value',TargetOS,'');
XMLConfig.SetDeleteValue(Path+'TargetCPU/Value',TargetCPU,'');
XMLConfig.SetDeleteValue(Path+'SubTarget/Value',SubTarget,'');
XMLConfig.SetDeleteValue(Path+'Subtarget/Value',Subtarget,'');
XMLConfig.SetDeleteValue(Path+'LCLPlatform/Value',
LCLPlatformDirNames[fTargetPlatform],
'');
@ -263,7 +263,7 @@ begin
TargetOS :=Source.TargetOS;
TargetDirectory :=Source.TargetDirectory;
TargetCPU :=Source.TargetCPU;
SubTarget :=Source.SubTarget;
Subtarget :=Source.Subtarget;
TargetPlatform :=Source.TargetPlatform;
IdeBuildMode :=Source.IdeBuildMode;
CleanOnce :=Source.CleanOnce;

View File

@ -48,7 +48,7 @@ uses
LazStringUtils, FPCAdds, LazVersion,
// CodeTools
FileProcs, DefineTemplates, CodeToolsCfgScript, CodeToolManager,
KeywordFuncLists, BasicCodeTools, LinkScanner,
KeywordFuncLists, BasicCodeTools, LinkScanner, DirectoryCacher,
// BuildIntf
ProjectIntf, MacroIntf, IDEExternToolIntf, CompOptsIntf, IDEOptionsIntf,
// IDEIntf
@ -914,21 +914,39 @@ procedure ConvertSearchPathToCmdParams(const Switch, Paths: String;
Params: TStrings);
var
StartPos: Integer;
l: Integer;
l, p, i: Integer;
EndPos: LongInt;
CurPath: String;
Kind: TCTStarDirectoryKind;
Cache: TCTStarDirectoryCache;
SubDirs: TStringListUTF8Fast;
begin
if Switch='' then
RaiseGDBException('ConvertSearchPathToCmdLine no Switch');
if (Paths = '') then exit;
l:=length(Paths);
StartPos:=1;
while StartPos<=l do begin
while StartPos<=l do
begin
while (StartPos<=l) and (Paths[StartPos]=' ') do inc(StartPos);
EndPos:=StartPos;
while (EndPos<=l) and (Paths[EndPos]<>';') do inc(EndPos);
if StartPos<EndPos then begin
// todo: /example/**
Params.Add(Switch + copy(Paths,StartPos,EndPos-StartPos));
if StartPos<EndPos then
begin
CurPath:=copy(Paths,StartPos,EndPos-StartPos);
Kind:=IsCTStarDirectory(CurPath,p);
if Kind=ctsdStarStar then
begin
Delete(CurPath,p+1,length(CurPath));
Cache:=CodeToolBoss.DirectoryCachePool.GetStarCache(CurPath,Kind);
if Cache<>nil then
begin
SubDirs:=Cache.Listing.SubDirs;
for i:=0 to SubDirs.Count-1 do
Params.Add(Switch + CurPath + SubDirs[i]);
end;
end else
Params.Add(Switch + CurPath);
end;
StartPos:=EndPos+1;
end;
@ -1625,7 +1643,7 @@ begin
TargetProcessor := aXMLConfig.GetValue(p+'TargetProcessor/Value', '');
TargetCPU := aXMLConfig.GetValue(p+'TargetCPU/Value', '');
TargetOS := aXMLConfig.GetValue(p+'TargetOS/Value', '');
SubTarget := aXMLConfig.GetValue(p+'SubTarget/Value', '');
Subtarget := aXMLConfig.GetValue(p+'Subtarget/Value', '');
OptimizationLevel := aXMLConfig.GetValue(p+'Optimizations/OptimizationLevel/Value', 1);
VariablesInRegisters := aXMLConfig.GetValue(p+'Optimizations/VariablesInRegisters/Value', false);
UncertainOptimizations := aXMLConfig.GetValue(p+'Optimizations/UncertainOptimizations/Value', false);
@ -1836,7 +1854,7 @@ begin
aXMLConfig.SetDeleteValue(p+'TargetProcessor/Value', TargetProcessor,'');
aXMLConfig.SetDeleteValue(p+'TargetCPU/Value', TargetCPU,'');
aXMLConfig.SetDeleteValue(p+'TargetOS/Value', TargetOS,'');
aXMLConfig.SetDeleteValue(p+'SubTarget/Value', SubTarget,'');
aXMLConfig.SetDeleteValue(p+'Subtarget/Value', Subtarget,'');
aXMLConfig.SetDeleteValue(p+'Optimizations/OptimizationLevel/Value', OptimizationLevel,1);
aXMLConfig.SetDeleteValue(p+'Optimizations/VariablesInRegisters/Value', VariablesInRegisters,false);
aXMLConfig.SetDeleteValue(p+'Optimizations/UncertainOptimizations/Value', UncertainOptimizations,false);
@ -2567,7 +2585,7 @@ var
Vars: TCTCfgScriptVariables;
CurTargetOS: String;
CurTargetCPU: String;
CurSubTarget: String;
CurSubtarget: String;
CurSrcOS: String;
dit: TCompilerDbgSymbolType;
CompilerFilename: String;
@ -2624,7 +2642,7 @@ begin
CurTargetOS:='';
CurTargetCPU:='';
CurSubTarget:='';
CurSubtarget:='';
if not (ccloNoMacroParams in Flags) then
begin
Vars:=GetBuildMacroValues(Self,true);
@ -2632,7 +2650,7 @@ begin
begin
CurTargetOS:=GetFPCTargetOS(Vars.Values['TargetOS']);
CurTargetCPU:=GetFPCTargetCPU(Vars.Values['TargetCPU']);
CurSubTarget:=Vars.Values['SubTarget'];
CurSubtarget:=Vars.Values['Subtarget'];
end;
end;
CurSrcOS:=GetDefaultSrcOSForTargetOS(CurTargetOS);
@ -2650,9 +2668,9 @@ begin
if (CurTargetCPU<>'')
and ((TargetCPU<>'') or (CurTargetCPU<>DefaultTargetCPU)) then
Result.Add('-P' + CurTargetCPU);
{ SubTarget }
if CurSubTarget<>'' then
Result.Add('-t'+CurSubTarget);
{ Subtarget }
if CurSubtarget<>'' then
Result.Add('-t'+CurSubtarget);
{ TargetProcessor }
if TargetProcessor<>'' then
Result.Add('-Cp'+UpperCase(TargetProcessor));

View File

@ -192,7 +192,7 @@ begin
or (SysUtils.CompareText('SrcOS',S)=0)
or (SysUtils.CompareText('SrcOS2',S)=0)
or (SysUtils.CompareText('TargetCPU',S)=0)
or (SysUtils.CompareText('SubTarget',S)=0)
or (SysUtils.CompareText('Subtarget',S)=0)
or (SysUtils.CompareText('LCLWidgetType',S)=0)
then begin
IDEMessageDialog(lisCCOErrorCaption,

View File

@ -109,15 +109,15 @@ object CompilerConfigTargetFrame: TCompilerConfigTargetFrame
Caption = 'lblTargetProc'
ParentColor = False
end
object lblSubTarget: TLabel
object lblSubtarget: TLabel
AnchorSideLeft.Control = lblTargetCPU
AnchorSideTop.Control = SubTargetComboBox
AnchorSideTop.Control = SubtargetComboBox
AnchorSideTop.Side = asrCenter
Left = 6
Height = 16
Top = 74
Width = 75
Caption = 'lblSubTarget'
Caption = 'lblSubtarget'
ParentColor = False
end
object TargetOSComboBox: TComboBox
@ -182,8 +182,8 @@ object CompilerConfigTargetFrame: TCompilerConfigTargetFrame
TabOrder = 3
Text = '0'
end
object SubTargetComboBox: TComboBox
AnchorSideLeft.Control = lblSubTarget
object SubtargetComboBox: TComboBox
AnchorSideLeft.Control = lblSubtarget
AnchorSideLeft.Side = asrBottom
AnchorSideTop.Control = TargetProcComboBox
AnchorSideTop.Side = asrBottom

View File

@ -57,12 +57,12 @@ type
lblTargetCPU: TLabel;
lblTargetOS: TLabel;
lblTargetProc: TLabel;
lblSubTarget: TLabel;
lblSubtarget: TLabel;
LCLWidgetTypeLabel: TLabel;
TargetCPUComboBox: TComboBox;
TargetOSComboBox: TComboBox;
TargetProcComboBox: TComboBox;
SubTargetComboBox: TComboBox;
SubtargetComboBox: TComboBox;
procedure chkCustomConfigFileClick(Sender: TObject);
procedure TargetOSComboBoxSelect(Sender: TObject);
procedure TargetCPUComboBoxSelect(Sender: TObject);
@ -310,8 +310,8 @@ begin
// WidgetSet
LCLWidgetTypeLabel.Caption := lisSelectAnotherLCLWidgetSet;
// SubTarget
lblSubTarget.Caption := lisSubTarget+' (-t)';
// Subtarget
lblSubtarget.Caption := lisSubtarget+' (-t)';
finally
List.Free;
end;
@ -339,7 +339,7 @@ begin
TargetCPUComboBox.ItemIndex := 0;
TargetCPUComboBox.Text := 'default';
TargetProcComboBox.Text := 'default';
SubTargetComboBox.Text := 'default';
SubtargetComboBox.Text := 'default';
CurrentWidgetTypeLabel.Visible:=false;
LCLWidgetTypeLabel.Visible:=false;
end else begin
@ -358,10 +358,10 @@ begin
UpdateByTargetCPU(TargetCPU);
UpdateByTargetOS(TargetOS);
TargetProcComboBox.Text := ProcessorToCaption(TargetProcessor);
with SubTargetComboBox do begin
with SubtargetComboBox do begin
Items.BeginUpdate;
Items.Assign(InputHistories.HistoryLists.GetList('SubTarget',true,rltCaseInsensitive));
SetComboBoxText(SubTargetComboBox,SubTarget,cstCaseInsensitive);
Items.Assign(InputHistories.HistoryLists.GetList('Subtarget',true,rltCaseInsensitive));
SetComboBoxText(SubtargetComboBox,Subtarget,cstCaseInsensitive);
Items.EndUpdate;
end;
PkgDep:=TProjectCompilerOptions(AOptions).LazProject.FindDependencyByName('LCL');
@ -399,7 +399,7 @@ begin
NewTargetCPU := '';
TargetCPU := CaptionToCPU(NewTargetCPU);
TargetProcessor := CaptionToProcessor(TargetProcComboBox.Text);
SubTarget := lowercase(SubTargetComboBox.Text);
Subtarget := lowercase(SubtargetComboBox.Text);
end;
Win32GraphicApp := chkWin32GraphicApp.Checked;
end;

View File

@ -511,7 +511,7 @@ begin
Templates:='$(LazarusDir)/lcl/units/$(TargetCPU)-$(TargetOS)'
+';$(LazarusDir)/lcl/units/$(TargetCPU)-$(TargetOS)/$(LCLWidgetType)'
+';$(LazarusDir)/components/yourpkg/units/$(TargetCPU)-$(TargetOS)'
+';$(LazarusDir)/components/yourpkg/units/$(TargetCPU)-$(TargetOS)-$(SubTarget)';
+';$(LazarusDir)/components/yourpkg/units/$(TargetCPU)-$(TargetOS)-$(Subtarget)';
OnClick := @PathEditBtnClick;
OnExecuted := @PathEditBtnExecuted;
end;

View File

@ -108,7 +108,7 @@ end;
procedure TIDEFPCInfoDialog.UpdateValuesMemo;
var
sl: TStringList;
TargetOS, TargetCPU, SubTarget: String;
TargetOS, TargetCPU, Subtarget: String;
CompilerFilename: String;
FPCSrcDir: String;
UnitSetCache: TFPCUnitSetCache;
@ -123,11 +123,11 @@ begin
TargetOS:=BuildBoss.GetTargetOS;
TargetCPU:=BuildBoss.GetTargetCPU;
SubTarget:=BuildBoss.GetSubTarget;
Subtarget:=BuildBoss.GetSubtarget;
CompilerFilename:=LazarusIDE.GetCompilerFilename;
FPCSrcDir:=EnvironmentOptions.GetParsedFPCSourceDirectory; // needs FPCVer macro
UnitSetCache:=CodeToolBoss.CompilerDefinesCache.FindUnitSet(
CompilerFilename,TargetOS,TargetCPU,SubTarget,'',FPCSrcDir,true);
CompilerFilename,TargetOS,TargetCPU,Subtarget,'',FPCSrcDir,true);
GatherFPCExecutable(UnitSetCache,sl);
ValuesMemo.Lines.Assign(sl);
@ -138,7 +138,7 @@ end;
procedure TIDEFPCInfoDialog.UpdateCmdLinePage;
var
TargetOS, TargetCPU, SubTarget, CompilerFilename, CompilerOptions: String;
TargetOS, TargetCPU, Subtarget, CompilerFilename, CompilerOptions: String;
Cfg: TPCTargetConfigCache;
Params: String;
ExtraOptions: String;
@ -188,9 +188,9 @@ begin
// fpc -va
TargetOS:=BuildBoss.GetTargetOS;
TargetCPU:=BuildBoss.GetTargetCPU;
SubTarget:=BuildBoss.GetSubTarget;
Subtarget:=BuildBoss.GetSubtarget;
Cfg:=CodeToolBoss.CompilerDefinesCache.ConfigCaches.Find(
CompilerFilename,CompilerOptions,TargetOS,TargetCPU,SubTarget,true);
CompilerFilename,CompilerOptions,TargetOS,TargetCPU,Subtarget,true);
TestFilename:=CodeToolBoss.CompilerDefinesCache.TestFilename;
Filename:=ExtractFileName(TestFilename);
WorkDir:=ExtractFilePath(TestFilename);
@ -291,7 +291,7 @@ begin
sl.Add('Active target:');
sl.Add('TargetOS='+BuildBoss.GetTargetOS);
sl.Add('TargetCPU='+BuildBoss.GetTargetCPU);
sl.Add('SubTarget='+BuildBoss.GetSubTarget);
sl.Add('Subtarget='+BuildBoss.GetSubtarget);
sl.Add('');
end;

View File

@ -196,7 +196,7 @@ resourcestring
lisLCLWidgetType = 'LCL widget type';
lisTargetCPU = 'Target CPU';
lisTargetOS = 'Target OS';
lisSubTarget = 'SubTarget';
lisSubtarget = 'Subtarget';
lisSrcOS = 'Src OS';
lisCommandLineParamsOfProgram = 'Command line parameters of program';
lisPromptForValue = 'Prompt for value';

View File

@ -77,8 +77,8 @@ type
FPackageAction: TPkgAction;
FPkgGraphVerbosity: TPkgVerbosityFlags;
FSkipDependencies: boolean;
FSubTargetOverride: boolean;
FSubTargetOverrideValue: String;
FSubtargetOverride: boolean;
FSubtargetOverrideValue: String;
fWidgetsetOverride: String;
function HasLongOptIgnoreCase(const S: String; out aValue: String): Boolean;
@ -175,8 +175,8 @@ type
property WidgetSetOverride: String read FWidgetsetOverride write FWidgetsetOverride;
property OSOverride: String read fOSOverride write fOSOverride;
property CPUOverride: String read fCPUOverride write fCPUOverride;
property SubTargetOverride: boolean read FSubTargetOverride write FSubTargetOverride;
property SubTargetOverrideValue: String read FSubTargetOverrideValue write FSubTargetOverrideValue;
property SubtargetOverride: boolean read FSubtargetOverride write FSubtargetOverride;
property SubtargetOverrideValue: String read FSubtargetOverrideValue write FSubtargetOverrideValue;
property CompilerOverride: String read fCompilerOverride write fCompilerOverride;
property LazarusDirOverride: String read fLazarusDirOverride write fLazarusDirOverride;
property BuildModeOverride: String read FBuildModeOverride write FBuildModeOverride;
@ -468,8 +468,8 @@ begin
APackage.CompilerOptions.TargetOS:=OSOverride;
if (Length(CPUOverride) <> 0) then
APackage.CompilerOptions.TargetCPU:=CPUOverride;
if SubTargetOverride then
APackage.CompilerOptions.SubTarget:=SubTargetOverrideValue;
if SubtargetOverride then
APackage.CompilerOptions.Subtarget:=SubtargetOverrideValue;
if CreateMakefile then
DoCreateMakefile(APackage)
@ -568,8 +568,8 @@ begin
CurProf.TargetOS:=OSOverride;
if (Length(CPUOverride) <> 0) then
CurProf.TargetCPU:=CPUOverride;
if SubTargetOverride then
CurProf.SubTarget:=SubTargetOverrideValue;
if SubtargetOverride then
CurProf.Subtarget:=SubtargetOverrideValue;
if WidgetSetOverride<>'' then
CurProf.TargetPlatform:=DirNameToLCLPlatform(WidgetSetOverride)
@ -793,8 +793,8 @@ var
Project1.CompilerOptions.TargetOS:=OSOverride;
if (CPUOverride<>'') then
Project1.CompilerOptions.TargetCPU:=CPUOverride;
if SubTargetOverride then
Project1.CompilerOptions.SubTarget:=SubTargetOverrideValue;
if SubtargetOverride then
Project1.CompilerOptions.Subtarget:=SubtargetOverrideValue;
if (WidgetSetOverride<>'') then begin
MatrixOption:=Project1.BuildModes.SessionMatrixOptions.Add(bmotIDEMacro);
MatrixOption.Modes:=Project1.ActiveBuildMode.Identifier;
@ -1187,7 +1187,7 @@ begin
// load static base packages
PackageGraph.LoadStaticBasePackages;
MainBuildBoss.SetBuildTarget(OSOverride,CPUOverride,SubTargetOverrideValue,
MainBuildBoss.SetBuildTarget(OSOverride,CPUOverride,SubtargetOverrideValue,
WidgetSetOverride,smsfsSkip,true);
fInitResult:=true;
@ -1726,10 +1726,10 @@ begin
end;
// subtarget
if HasLongOptIgnoreCase('subtarget',FSubTargetOverrideValue) then begin
FSubTargetOverride:=true;
if HasLongOptIgnoreCase('subtarget',FSubtargetOverrideValue) then begin
FSubtargetOverride:=true;
if ConsoleVerbosity>=0 then
writeln('Parameter: subtarget=',FSubTargetOverrideValue);
writeln('Parameter: subtarget=',FSubtargetOverrideValue);
end;
// build mode