From 022a5157838378d31bff85b43df3b080597ee464 Mon Sep 17 00:00:00 2001 From: mattias Date: Mon, 18 Dec 2017 12:20:03 +0000 Subject: [PATCH] codetools: renamed FPCDefinesCache to CompilerDefinesCache git-svn-id: trunk@56776 - --- components/codetools/codetoolmanager.pas | 31 +++++----- components/codetools/definetemplates.pas | 62 ++++++++++--------- .../examples/testfpcsrcunitrules.lpr | 2 +- components/codetools/ide/ppulistdlg.pas | 2 +- components/pas2js/pjsdsgnregister.pas | 8 +-- ide/buildlazdialog.pas | 2 +- ide/buildmanager.pas | 42 ++++++------- ide/checkcompileropts.pas | 6 +- ide/codebrowser.pas | 2 +- ide/codetoolsdefines.pas | 4 +- ide/compileroptions.pp | 2 +- ide/etfpcmsgparser.pas | 2 +- ide/fpcsrcscan.pas | 2 +- ide/frames/compiler_compilation_options.pas | 4 +- ide/frames/files_options.pas | 4 +- ide/idefpcinfo.pas | 12 ++-- ide/ideinfodlg.pas | 6 +- ide/initialsetupdlgs.pas | 10 +-- ide/initialsetupproc.pas | 6 +- ide/inspectchksumchangeddlg.pas | 2 +- ide/lazarus.lpi | 21 ++++++- ide/lazbuild.lpr | 6 +- ide/main.pp | 8 +-- packager/packagesystem.pas | 2 +- 24 files changed, 134 insertions(+), 114 deletions(-) diff --git a/components/codetools/codetoolmanager.pas b/components/codetools/codetoolmanager.pas index 6310f996b7..1aedf4d215 100644 --- a/components/codetools/codetoolmanager.pas +++ b/components/codetools/codetoolmanager.pas @@ -213,11 +213,12 @@ type PPUCache: TPPUTools; GlobalValues: TExpressionEvaluator; DirectoryCachePool: TCTDirectoryCachePool; - FPCDefinesCache: TFPCDefinesCache; + CompilerDefinesCache: TCompilerDefinesCache; IdentifierList: TIdentifierList; IdentifierHistory: TIdentifierHistoryList; Positions: TCodeXYPositions; Indenter: TFullyAutomaticBeautifier; + property FPCDefinesCache: TCompilerDefinesCache read CompilerDefinesCache; deprecated 'use CompilerDefinesCache'; // 1.9 property Beautifier: TBeautifyCodeOptions read GetBeautifier; constructor Create; @@ -1021,7 +1022,7 @@ begin OnFileExistsCached:=@DirectoryCachePool.FileExists; OnFileAgeCached:=@DirectoryCachePool.FileAge; DefineTree.DirectoryCachePool:=DirectoryCachePool; - FPCDefinesCache:=TFPCDefinesCache.Create(nil); + CompilerDefinesCache:=TCompilerDefinesCache.Create(nil); PPUCache:=TPPUTools.Create; FAddInheritedCodeToOverrideMethod:=true; FAdjustTopLineDueToComment:=true; @@ -1090,7 +1091,7 @@ begin if OnFileAgeCached=@DirectoryCachePool.FileAge then OnFileAgeCached:=nil; FreeAndNil(DirectoryCachePool); - FreeAndNil(FPCDefinesCache); + FreeAndNil(CompilerDefinesCache); for e:=low(FHandlers) to high(FHandlers) do FreeAndNil(FHandlers[e]); {$IFDEF CTDEBUG} @@ -1131,13 +1132,13 @@ begin Variables[ExternalMacroStart+'ProjectDir']:=Config.ProjectDir; end; - FPCDefinesCache.ConfigCaches.Assign(Config.ConfigCaches); - FPCDefinesCache.SourceCaches.Assign(Config.SourceCaches); - FPCDefinesCache.TestFilename:=Config.TestPascalFile; - if FPCDefinesCache.TestFilename='' then - FPCDefinesCache.TestFilename:=GetTempFilename('fpctest.pas',''); + CompilerDefinesCache.ConfigCaches.Assign(Config.ConfigCaches); + CompilerDefinesCache.SourceCaches.Assign(Config.SourceCaches); + CompilerDefinesCache.TestFilename:=Config.TestPascalFile; + if CompilerDefinesCache.TestFilename='' then + CompilerDefinesCache.TestFilename:=GetTempFilename('fpctest.pas',''); - UnitSetCache:=FPCDefinesCache.FindUnitSet(Config.FPCPath, + UnitSetCache:=CompilerDefinesCache.FindUnitSet(Config.FPCPath, Config.TargetOS,Config.TargetProcessor,Config.FPCOptions,Config.FPCSrcDir, true); // parse compiler settings, fpc sources @@ -1149,8 +1150,8 @@ begin // debugln(['TCodeToolManager.Init TargetCPU=',CfgCache.TargetCPU,' RealTargetCPU=',CfgCache.RealTargetCPU]); // save - Config.ConfigCaches.Assign(FPCDefinesCache.ConfigCaches); - Config.SourceCaches.Assign(FPCDefinesCache.SourceCaches); + Config.ConfigCaches.Assign(CompilerDefinesCache.ConfigCaches); + Config.SourceCaches.Assign(CompilerDefinesCache.SourceCaches); // create template for FPC settings FPCDefines:=CreateFPCTemplate(UnitSetCache,nil); @@ -1660,7 +1661,7 @@ begin ID:=GetUnitSetIDForDirectory(Directory,true); if ID='' then exit; Changed:=false; - Result:=FPCDefinesCache.FindUnitSetWithID(ID,Changed,false); + Result:=CompilerDefinesCache.FindUnitSetWithID(ID,Changed,false); if Changed then Result:=nil; end; @@ -6323,7 +6324,7 @@ var UnitSetCache: TFPCUnitSetCache; begin Result:=''; - UnitSetCache:=FPCDefinesCache.FindUnitSetWithID(UnitSet,Changed,false); + UnitSetCache:=CompilerDefinesCache.FindUnitSetWithID(UnitSet,Changed,false); if UnitSetCache=nil then begin debugln(['TCodeToolManager.DirectoryCachePoolGetUnitFromSet invalid UnitSet="',dbgstr(UnitSet),'"']); exit; @@ -6342,7 +6343,7 @@ var UnitSetCache: TFPCUnitSetCache; begin Result:=''; - UnitSetCache:=FPCDefinesCache.FindUnitSetWithID(UnitSet,Changed,false); + UnitSetCache:=CompilerDefinesCache.FindUnitSetWithID(UnitSet,Changed,false); if UnitSetCache=nil then begin debugln(['TCodeToolManager.DirectoryCachePoolGetCompiledUnitFromSet invalid UnitSet="',dbgstr(UnitSet),'"']); exit; @@ -6363,7 +6364,7 @@ var Node: TAVLTreeNode; Item: PStringToStringItem; begin - UnitSetCache:=FPCDefinesCache.FindUnitSetWithID(UnitSet,Changed,false); + UnitSetCache:=CompilerDefinesCache.FindUnitSetWithID(UnitSet,Changed,false); if UnitSetCache=nil then begin debugln(['TCodeToolManager.DirectoryCachePoolIterateFPCUnitsFromSet invalid UnitSet="',dbgstr(UnitSet),'"']); exit; diff --git a/components/codetools/definetemplates.pas b/components/codetools/definetemplates.pas index 732b16467d..628dea2d0c 100644 --- a/components/codetools/definetemplates.pas +++ b/components/codetools/definetemplates.pas @@ -900,7 +900,7 @@ type CreateIfNotExists: boolean): TFPCSourceCache; end; - TFPCDefinesCache = class; + TCompilerDefinesCache = class; TFPCUnitToSrcCacheFlag = ( fuscfSrcRulesNeedUpdate, @@ -914,7 +914,7 @@ type TFPCUnitSetCache = class(TComponent) private - FCaches: TFPCDefinesCache; + FCaches: TCompilerDefinesCache; FChangeStamp: integer; FCompilerFilename: string; FCompilerOptions: string; @@ -946,7 +946,7 @@ type destructor Destroy; override; procedure Clear; procedure Init; - property Caches: TFPCDefinesCache read FCaches; + property Caches: TCompilerDefinesCache read FCaches; property CompilerFilename: string read FCompilerFilename write SetCompilerFilename; property CompilerOptions: string read FCompilerOptions write SetCompilerOptions; property TargetOS: string read FTargetOS write SetTargetOS; // case insensitive, will be passed lowercase @@ -968,9 +968,9 @@ type function GetFirstFPCCfg: string; end; - { TFPCDefinesCache } + { TCompilerDefinesCache } - TFPCDefinesCache = class(TComponent) + TCompilerDefinesCache = class(TComponent) private FConfigCaches: TFPCTargetConfigCaches; FConfigCachesSaveStamp: integer; @@ -1011,6 +1011,8 @@ type out ChangeStamp: integer); end; + TFPCDefinesCache = TCompilerDefinesCache deprecated 'use TCompilerDefinesCache'; // 1.9 + function DefineActionNameToAction(const s: string): TDefineAction; function DefineTemplateFlagsToString(Flags: TDefineTemplateFlags): string; function GetDefaultSrcOSForTargetOS(const TargetOS: string): string; @@ -9726,38 +9728,38 @@ begin end; end; -{ TFPCDefinesCache } +{ TCompilerDefinesCache } -procedure TFPCDefinesCache.SetConfigCaches(const AValue: TFPCTargetConfigCaches); +procedure TCompilerDefinesCache.SetConfigCaches(const AValue: TFPCTargetConfigCaches); begin if FConfigCaches=AValue then exit; FConfigCaches:=AValue; FConfigCachesSaveStamp:=Low(FConfigCachesSaveStamp); end; -function TFPCDefinesCache.GetExtraOptions: string; +function TCompilerDefinesCache.GetExtraOptions: string; begin Result:=ConfigCaches.ExtraOptions; end; -function TFPCDefinesCache.GetTestFilename: string; +function TCompilerDefinesCache.GetTestFilename: string; begin Result:=ConfigCaches.TestFilename; end; -procedure TFPCDefinesCache.SetExtraOptions(AValue: string); +procedure TCompilerDefinesCache.SetExtraOptions(AValue: string); begin ConfigCaches.ExtraOptions:=AValue; end; -procedure TFPCDefinesCache.SetSourceCaches(const AValue: TFPCSourceCaches); +procedure TCompilerDefinesCache.SetSourceCaches(const AValue: TFPCSourceCaches); begin if FSourceCaches=AValue then exit; FSourceCaches:=AValue; FSourceCachesSaveStamp:=low(FSourceCachesSaveStamp); end; -procedure TFPCDefinesCache.ClearUnitToSrcCaches; +procedure TCompilerDefinesCache.ClearUnitToSrcCaches; var i: Integer; begin @@ -9766,12 +9768,12 @@ begin fUnitToSrcCaches.Clear; end; -procedure TFPCDefinesCache.SetTestFilename(AValue: string); +procedure TCompilerDefinesCache.SetTestFilename(AValue: string); begin ConfigCaches.TestFilename:=AValue; end; -constructor TFPCDefinesCache.Create(AOwner: TComponent); +constructor TCompilerDefinesCache.Create(AOwner: TComponent); begin inherited Create(AOwner); ConfigCaches:=TFPCTargetConfigCaches.Create(nil); @@ -9779,7 +9781,7 @@ begin fUnitToSrcCaches:=TFPList.Create; end; -destructor TFPCDefinesCache.Destroy; +destructor TCompilerDefinesCache.Destroy; begin ClearUnitToSrcCaches; FreeAndNil(FConfigCaches); @@ -9788,14 +9790,14 @@ begin inherited Destroy; end; -procedure TFPCDefinesCache.Clear; +procedure TCompilerDefinesCache.Clear; begin ClearUnitToSrcCaches; if ConfigCaches<>nil then ConfigCaches.Clear; if SourceCaches<>nil then SourceCaches.Clear; end; -procedure TFPCDefinesCache.LoadFromXMLConfig(XMLConfig: TXMLConfig; +procedure TCompilerDefinesCache.LoadFromXMLConfig(XMLConfig: TXMLConfig; const Path: string); begin if ConfigCaches<>nil then begin @@ -9808,10 +9810,10 @@ begin end; end; -procedure TFPCDefinesCache.SaveToXMLConfig(XMLConfig: TXMLConfig; +procedure TCompilerDefinesCache.SaveToXMLConfig(XMLConfig: TXMLConfig; const Path: string); begin - //debugln(['TFPCDefinesCache.SaveToXMLConfig ']); + //debugln(['TCompilerDefinesCache.SaveToXMLConfig ']); if ConfigCaches<>nil then begin ConfigCaches.SaveToXMLConfig(XMLConfig,Path+'FPCConfigs/'); FConfigCachesSaveStamp:=ConfigCaches.ChangeStamp; @@ -9822,7 +9824,7 @@ begin end; end; -procedure TFPCDefinesCache.LoadFromFile(Filename: string); +procedure TCompilerDefinesCache.LoadFromFile(Filename: string); var XMLConfig: TXMLConfig; begin @@ -9834,7 +9836,7 @@ begin end; end; -procedure TFPCDefinesCache.SaveToFile(Filename: string); +procedure TCompilerDefinesCache.SaveToFile(Filename: string); var XMLConfig: TXMLConfig; begin @@ -9846,7 +9848,7 @@ begin end; end; -function TFPCDefinesCache.NeedsSave: boolean; +function TCompilerDefinesCache.NeedsSave: boolean; begin Result:=true; if (ConfigCaches<>nil) and (ConfigCaches.ChangeStamp<>FConfigCachesSaveStamp) @@ -9856,7 +9858,7 @@ begin Result:=false; end; -function TFPCDefinesCache.GetFPCVersion(const CompilerFilename, TargetOS, +function TCompilerDefinesCache.GetFPCVersion(const CompilerFilename, TargetOS, TargetCPU: string; UseCompiledVersionAsDefault: boolean): string; var CfgCache: TFPCTargetConfigCache; @@ -9876,7 +9878,7 @@ begin Result:=CfgCache.FullVersion; end; -function TFPCDefinesCache.FindUnitSet(const CompilerFilename, TargetOS, +function TCompilerDefinesCache.FindUnitSet(const CompilerFilename, TargetOS, TargetCPU, Options, FPCSrcDir: string; CreateIfNotExists: boolean ): TFPCUnitSetCache; var @@ -9904,7 +9906,7 @@ begin Result:=nil; end; -function TFPCDefinesCache.FindUnitSetWithID(const UnitSetID: string; out +function TCompilerDefinesCache.FindUnitSetWithID(const UnitSetID: string; out Changed: boolean; CreateIfNotExists: boolean): TFPCUnitSetCache; var CompilerFilename, TargetOS, TargetCPU, Options, FPCSrcDir: string; @@ -9912,7 +9914,7 @@ var begin ParseUnitSetID(UnitSetID,CompilerFilename, TargetOS, TargetCPU, Options, FPCSrcDir, ChangeStamp); - //debugln(['TFPCDefinesCache.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]); + //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, Options, FPCSrcDir, false); if Result<>nil then begin @@ -9925,7 +9927,7 @@ begin Changed:=false; end; -function TFPCDefinesCache.GetUnitSetID(CompilerFilename, TargetOS, TargetCPU, +function TCompilerDefinesCache.GetUnitSetID(CompilerFilename, TargetOS, TargetCPU, Options, FPCSrcDir: string; ChangeStamp: integer): string; begin Result:='CompilerFilename='+CompilerFilename+LineEnding @@ -9936,7 +9938,7 @@ begin +'Stamp='+IntToStr(ChangeStamp); end; -procedure TFPCDefinesCache.ParseUnitSetID(const ID: string; +procedure TCompilerDefinesCache.ParseUnitSetID(const ID: string; out CompilerFilename, TargetOS, TargetCPU, Options, FPCSrcDir: string; out ChangeStamp: integer); var @@ -9977,7 +9979,7 @@ begin ValueEndPos:=ValueStartPos; while not (ValueEndPos^ in [#10,#13,#0]) do inc(ValueEndPos); Value:=copy(ID,ValueStartPos-PChar(ID)+1,ValueEndPos-ValueStartPos); - //debugln(['TFPCDefinesCache.ParseUnitSetID Name=',copy(ID,NameStartPos-PChar(ID)+1,ValueStartPos-NameStartPos-1),' Value="',Value,'"']); + //debugln(['TCompilerDefinesCache.ParseUnitSetID Name=',copy(ID,NameStartPos-PChar(ID)+1,ValueStartPos-NameStartPos-1),' Value="',Value,'"']); case NameStartPos^ of 'c','C': if NameFits('CompilerFilename') then @@ -10072,7 +10074,7 @@ constructor TFPCUnitSetCache.Create(TheOwner: TComponent); begin inherited Create(TheOwner); CTIncreaseChangeStamp(FChangeStamp); // set ot not 0 - FCaches:=TheOwner as TFPCDefinesCache; + FCaches:=TheOwner as TCompilerDefinesCache; fUnitToSourceTree:=TStringToStringTree.Create(false); fSrcDuplicates:=TStringToStringTree.Create(false); fSourceRules:=TFPCSourceRules.Create; diff --git a/components/codetools/examples/testfpcsrcunitrules.lpr b/components/codetools/examples/testfpcsrcunitrules.lpr index 0260591ef6..0cf59e541f 100644 --- a/components/codetools/examples/testfpcsrcunitrules.lpr +++ b/components/codetools/examples/testfpcsrcunitrules.lpr @@ -120,7 +120,7 @@ begin CodeToolBoss.Init(Options); - UnitSet:=CodeToolBoss.FPCDefinesCache.FindUnitSet(CompilerFilename, + UnitSet:=CodeToolBoss.CompilerDefinesCache.FindUnitSet(CompilerFilename, TargetOS,TargetCPU,'',FPCSrcDir,true); UnitSet.Init; diff --git a/components/codetools/ide/ppulistdlg.pas b/components/codetools/ide/ppulistdlg.pas index be16c63fc3..2818970569 100644 --- a/components/codetools/ide/ppulistdlg.pas +++ b/components/codetools/ide/ppulistdlg.pas @@ -455,7 +455,7 @@ var begin UnitSetID:=CodeToolBoss.GetUnitSetIDForDirectory(BaseDir{%H-}); if UnitSetID='' then exit; - Cache:=CodeToolBoss.FPCDefinesCache.FindUnitSetWithID(UnitSetID,HasChanged,false); + Cache:=CodeToolBoss.CompilerDefinesCache.FindUnitSetWithID(UnitSetID,HasChanged,false); if Cache=nil then exit; CfgCache:=Cache.GetConfigCache(false); if CfgCache=nil then exit; diff --git a/components/pas2js/pjsdsgnregister.pas b/components/pas2js/pjsdsgnregister.pas index adc004999d..d8eaf3208f 100644 --- a/components/pas2js/pjsdsgnregister.pas +++ b/components/pas2js/pjsdsgnregister.pas @@ -246,8 +246,8 @@ begin CompOpts.SetAlternativeCompile( '$MakeExe(pas2js) -Jc -Jminclude -Tnodejs "-Fu$(ProjUnitPath)" $Name($(ProjFile))',true); RunParams:=AProject.RunParameters; - RunParams.UseLaunchingApplication:=True; - RunParams.LaunchingApplicationPathPlusParams:='$(Pas2JSNodeJS) "$MakeDir($(ProjPath))$NameOnly($(ProjFile)).js"'; + //ToDo RunParams.UseLaunchingApplication:=True; + //ToDo RunParams.LaunchingApplicationPathPlusParams:='$(Pas2JSNodeJS) "$MakeDir($(ProjPath))$NameOnly($(ProjFile)).js"'; // create program source NewSource:=CreateProjectSource; @@ -497,8 +497,8 @@ begin CompOpts.SetAlternativeCompile( '$MakeExe(pas2js) -Jirtl.js -Jc -Jminclude -Tbrowser "-Fu$(ProjUnitPath)" $Name($(ProjFile))',true); RunParams:=AProject.RunParameters; - RunParams.UseLaunchingApplication:=True; - RunParams.LaunchingApplicationPathPlusParams:=GetBrowserCommand(CompOpts.TargetFileName); + //ToDo RunParams.UseLaunchingApplication:=True; + //ToDo RunParams.LaunchingApplicationPathPlusParams:=GetBrowserCommand(CompOpts.TargetFileName); AProject.MainFile.SetSourceText(CreateProjectSource,true); AProject.CustomData.Values[PJSProjectWebBrowser]:='1'; if baoUseURL in Options then diff --git a/ide/buildlazdialog.pas b/ide/buildlazdialog.pas index fbdf2b3d95..e25c92c0eb 100644 --- a/ide/buildlazdialog.pas +++ b/ide/buildlazdialog.pas @@ -626,7 +626,7 @@ begin fTargetFilename:=''; fUnitOutDir:=''; - CodeToolBoss.FPCDefinesCache.ConfigCaches.GetDefaultCompilerTarget( + CodeToolBoss.CompilerDefinesCache.ConfigCaches.GetDefaultCompilerTarget( EnvironmentOptions.GetParsedCompilerFilename,'',fCompilerTargetOS,fCompilerTargetCPU); if fCompilerTargetOS='' then fCompilerTargetOS:=GetCompiledTargetOS; diff --git a/ide/buildmanager.pas b/ide/buildmanager.pas index f9f9d46ab7..9ce57ecc9c 100644 --- a/ide/buildmanager.pas +++ b/ide/buildmanager.pas @@ -209,8 +209,8 @@ type procedure RescanCompilerDefines(ResetBuildTarget, ClearCaches, WaitTillDone, Quiet: boolean); override; function CompilerOnDiskChanged: boolean; override; - procedure LoadFPCDefinesCaches; - procedure SaveFPCDefinesCaches; + procedure LoadCompilerDefinesCaches; + procedure SaveCompilerDefinesCaches; property UnitSetCache: TFPCUnitSetCache read FUnitSetCache write SetUnitSetCache; function DoCheckIfProjectNeedsCompilation(AProject: TProject; @@ -766,7 +766,7 @@ begin CodeToolBoss.DefinePool.EnglishErrorMsgFilename:= AppendPathDelim(EnvironmentOptions.GetParsedLazarusDirectory)+ GetForcedPathDelims('components/codetools/fpc.errore.msg'); - CodeToolBoss.FPCDefinesCache.ExtraOptions:= + CodeToolBoss.CompilerDefinesCache.ExtraOptions:= '-Fr'+CodeToolBoss.DefinePool.EnglishErrorMsgFilename; end; end; @@ -850,8 +850,8 @@ begin {$IFDEF VerboseFPCSrcScan} debugln(['TBuildManager.RescanCompilerDefines clear caches']); {$ENDIF} - CodeToolBoss.FPCDefinesCache.ConfigCaches.Clear; - CodeToolBoss.FPCDefinesCache.SourceCaches.Clear; + CodeToolBoss.CompilerDefinesCache.ConfigCaches.Clear; + CodeToolBoss.CompilerDefinesCache.SourceCaches.Clear; end; if ResetBuildTarget then SetBuildTarget('','','',smsfsSkip,true); @@ -887,7 +887,7 @@ begin {$IFDEF VerboseFPCSrcScan} debugln(['TBuildManager.RescanCompilerDefines reading default compiler settings']); {$ENDIF} - UnitSetCache:=CodeToolBoss.FPCDefinesCache.FindUnitSet( + UnitSetCache:=CodeToolBoss.CompilerDefinesCache.FindUnitSet( EnvironmentOptions.GetParsedCompilerFilename,'','','',FPCSrcDir,true); UnitSetCache.GetConfigCache(true); end; @@ -924,7 +924,7 @@ begin {$IFDEF VerboseFPCSrcScan} debugln(['TBuildManager.RescanCompilerDefines reading active compiler settings']); {$ENDIF} - UnitSetCache:=CodeToolBoss.FPCDefinesCache.FindUnitSet( + UnitSetCache:=CodeToolBoss.CompilerDefinesCache.FindUnitSet( CompilerFilename,TargetOS,TargetCPU,FPCOptions,FPCSrcDir,true); NeedUpdateFPCSrcCache:=false; @@ -972,7 +972,7 @@ begin debugln(['TBuildManager.RescanCompilerDefines UnitSet changed => save scan results']); {$ENDIF} // save caches - SaveFPCDefinesCaches; + SaveCompilerDefinesCaches; FUnitSetChangeStamp:=UnitSetCache.ChangeStamp; end; @@ -1069,7 +1069,7 @@ begin Result:=CfgCache.NeedsUpdate; end; -procedure TBuildManager.LoadFPCDefinesCaches; +procedure TBuildManager.LoadCompilerDefinesCaches; var aFilename: String; XMLConfig: TXMLConfig; @@ -1080,40 +1080,40 @@ begin try XMLConfig:=TXMLConfig.Create(aFilename); try - CodeToolBoss.FPCDefinesCache.LoadFromXMLConfig(XMLConfig,''); + CodeToolBoss.CompilerDefinesCache.LoadFromXMLConfig(XMLConfig,''); finally XMLConfig.Free; end; except on E: Exception do begin if ConsoleVerbosity>=0 then - debugln(['Error: (lazarus) [LoadFPCDefinesCaches] Error reading file '+aFilename+':'+E.Message]); + debugln(['Error: (lazarus) [LoadCompilerDefinesCaches] Error reading file '+aFilename+':'+E.Message]); end; end; end; -procedure TBuildManager.SaveFPCDefinesCaches; +procedure TBuildManager.SaveCompilerDefinesCaches; var aFilename: String; XMLConfig: TXMLConfig; begin aFilename:=AppendPathDelim(GetPrimaryConfigPath)+'fpcdefines.xml'; - //debugln(['TBuildManager.SaveFPCDefinesCaches check if save needed ...']); + //debugln(['TBuildManager.SaveCompilerDefinesCaches check if save needed ...']); if FileExistsCached(aFilename) - and (not CodeToolBoss.FPCDefinesCache.NeedsSave) then + and (not CodeToolBoss.CompilerDefinesCache.NeedsSave) then exit; - //debugln(['TBuildManager.SaveFPCDefinesCaches saving ...']); + //debugln(['TBuildManager.SaveCompilerDefinesCaches saving ...']); try XMLConfig:=TXMLConfig.CreateClean(aFilename); try - CodeToolBoss.FPCDefinesCache.SaveToXMLConfig(XMLConfig,''); + CodeToolBoss.CompilerDefinesCache.SaveToXMLConfig(XMLConfig,''); finally XMLConfig.Free; end; except on E: Exception do begin if ConsoleVerbosity>=0 then - debugln(['Error: (lazarus) [SaveFPCDefinesCaches] Error writing file '+aFilename+':'+E.Message]); + debugln(['Error: (lazarus) [SaveCompilerDefinesCaches] Error writing file '+aFilename+':'+E.Message]); end; end; end; @@ -2117,13 +2117,13 @@ function TBuildManager.MacroFuncFPCVer(const Param: string; const Data: PtrInt; if not IsFPCExecutable(CompilerFilename,s) then exit; TargetOS:=GetTargetOS; TargetCPU:=GetTargetCPU; - ConfigCache:=CodeToolBoss.FPCDefinesCache.ConfigCaches.Find( + ConfigCache:=CodeToolBoss.CompilerDefinesCache.ConfigCaches.Find( CompilerFilename,'',TargetOS,TargetCPU,true); if ConfigCache=nil then exit; if ConfigCache.NeedsUpdate then begin // ask compiler - if not ConfigCache.Update(CodeToolBoss.FPCDefinesCache.TestFilename, - CodeToolBoss.FPCDefinesCache.ExtraOptions,nil) + if not ConfigCache.Update(CodeToolBoss.CompilerDefinesCache.TestFilename, + CodeToolBoss.CompilerDefinesCache.ExtraOptions,nil) then exit; end; @@ -2758,7 +2758,7 @@ begin else if fTargetOS<>'' then CompQueryOptions:='-T'+GetFPCTargetOS(fTargetOS); // Note: resolving the comiler filename requires macros - CodeToolBoss.FPCDefinesCache.ConfigCaches.GetDefaultCompilerTarget( + CodeToolBoss.CompilerDefinesCache.ConfigCaches.GetDefaultCompilerTarget( GetFPCompilerFilename,CompQueryOptions,CompilerTargetOS,CompilerTargetCPU); if fTargetOS='' then fTargetOS:=CompilerTargetOS; diff --git a/ide/checkcompileropts.pas b/ide/checkcompileropts.pas index af2d61e6bb..3e8e3b6589 100644 --- a/ide/checkcompileropts.pas +++ b/ide/checkcompileropts.pas @@ -891,11 +891,11 @@ begin TargetOS:=Options.TargetOS; TargetCPU:=Options.TargetCPU; - CfgCache:=CodeToolBoss.FPCDefinesCache.ConfigCaches.Find(CompilerFilename, + CfgCache:=CodeToolBoss.CompilerDefinesCache.ConfigCaches.Find(CompilerFilename, '',TargetOS,TargetCPU,true); if CfgCache.NeedsUpdate then - CfgCache.Update(CodeToolBoss.FPCDefinesCache.TestFilename, - CodeToolBoss.FPCDefinesCache.ExtraOptions); + CfgCache.Update(CodeToolBoss.CompilerDefinesCache.TestFilename, + CodeToolBoss.CompilerDefinesCache.ExtraOptions); // check compiler config Result:=CheckCompilerConfig(CfgCache); diff --git a/ide/codebrowser.pas b/ide/codebrowser.pas index 31bc387876..d2ac99aab1 100644 --- a/ide/codebrowser.pas +++ b/ide/codebrowser.pas @@ -1377,7 +1377,7 @@ var UnitSetID:=CodeToolBoss.GetUnitSetIDForDirectory(LazDir); if UnitSetID='' then exit; UnitSetChanged:=false; - UnitSet:=CodeToolBoss.FPCDefinesCache.FindUnitSetWithID(UnitSetID, + UnitSet:=CodeToolBoss.CompilerDefinesCache.FindUnitSetWithID(UnitSetID, UnitSetChanged,false); if UnitSet=nil then exit; ConfigCache:=UnitSet.GetConfigCache(false); diff --git a/ide/codetoolsdefines.pas b/ide/codetoolsdefines.pas index 1b23546f4e..39a8f8ac90 100644 --- a/ide/codetoolsdefines.pas +++ b/ide/codetoolsdefines.pas @@ -608,7 +608,7 @@ begin TargetOS:=''; TargetProcessor:=''; - UnitSetCache:=Boss.FPCDefinesCache.FindUnitSet(CompilerPath, + UnitSetCache:=Boss.CompilerDefinesCache.FindUnitSet(CompilerPath, TargetOS,TargetProcessor,'',FPCSrcDir,true); // create directory defines @@ -717,7 +717,7 @@ begin if Macros<>nil then Macros.SubstituteStr(FPCSrcDir); DebugLn(' FPCSrcDir="',FPCSrcDir,'"'); - UnitSetCache:=Boss.FPCDefinesCache.FindUnitSet(CompilerPath, + UnitSetCache:=Boss.CompilerDefinesCache.FindUnitSet(CompilerPath, TargetOS,TargetProcessor,'',FPCSrcDir,true); // create FPC Source defines FPCSrcTemplate:=CreateFPCSourceTemplate(UnitSetCache,CodeToolsOpts); diff --git a/ide/compileroptions.pp b/ide/compileroptions.pp index 352371b04f..2255032264 100644 --- a/ide/compileroptions.pp +++ b/ide/compileroptions.pp @@ -2888,7 +2888,7 @@ begin FPCompilerFilename:=CompilerFilename else FPCompilerFilename:=EnvironmentOptions.GetParsedCompilerFilename; - CodeToolBoss.FPCDefinesCache.ConfigCaches.GetDefaultCompilerTarget( + CodeToolBoss.CompilerDefinesCache.ConfigCaches.GetDefaultCompilerTarget( FPCompilerFilename,'',DefaultTargetOS,DefaultTargetCPU); { ------------------ Target --------------------- } diff --git a/ide/etfpcmsgparser.pas b/ide/etfpcmsgparser.pas index 30af51bc47..69dfeb6250 100644 --- a/ide/etfpcmsgparser.pas +++ b/ide/etfpcmsgparser.pas @@ -1010,7 +1010,7 @@ begin // => use fpcsrcdir/compiler/msg/errore.msg // the fpcsrcdir might depend on the FPC version if IsFPCExecutable(CompilerFilename,ErrMsg) then - FPCVer:=CodeToolBoss.FPCDefinesCache.GetFPCVersion(CompilerFilename,TargetOS,TargetCPU,false) + FPCVer:=CodeToolBoss.CompilerDefinesCache.GetFPCVersion(CompilerFilename,TargetOS,TargetCPU,false) else FPCVer:=''; FPCSrcDir:=EnvironmentOptions.GetParsedFPCSourceDirectory(FPCVer); diff --git a/ide/fpcsrcscan.pas b/ide/fpcsrcscan.pas index cb9a0efecb..54f9965f8d 100644 --- a/ide/fpcsrcscan.pas +++ b/ide/fpcsrcscan.pas @@ -84,7 +84,7 @@ begin // copy Files to codetools cache if CodeToolBoss<>nil then begin - SrcCache:=CodeToolBoss.FPCDefinesCache.SourceCaches.Find(FPCSrcDir,true); + SrcCache:=CodeToolBoss.CompilerDefinesCache.SourceCaches.Find(FPCSrcDir,true); debugln(['ApplyFPCSrcFiles SrcCache.Update ...']); SrcCache.Update(Files); diff --git a/ide/frames/compiler_compilation_options.pas b/ide/frames/compiler_compilation_options.pas index 5c340ef0a8..ec080796e3 100644 --- a/ide/frames/compiler_compilation_options.pas +++ b/ide/frames/compiler_compilation_options.pas @@ -139,7 +139,7 @@ begin if IsPas2JSExecutable(NewFilename,s) then begin // check pas2js Quality:=CheckPas2jsQuality(NewFilename,Note, - CodeToolBoss.FPCDefinesCache.TestFilename); + CodeToolBoss.CompilerDefinesCache.TestFilename); if not ShowQuality(Quality,NewFilename,Note) then exit; ok:=true; end; @@ -147,7 +147,7 @@ begin if IsFPCExecutable(NewFilename,s) then begin // check fpc Quality:=CheckCompilerQuality(NewFilename,Note, - CodeToolBoss.FPCDefinesCache.TestFilename); + CodeToolBoss.CompilerDefinesCache.TestFilename); if not ShowQuality(Quality,NewFilename,Note) then exit; ok:=true; end; diff --git a/ide/frames/files_options.pas b/ide/frames/files_options.pas index b481f54dd5..d73344c5af 100644 --- a/ide/frames/files_options.pas +++ b/ide/frames/files_options.pas @@ -465,7 +465,7 @@ var begin if EnvironmentOptions.FPCSourceDirectory=FOldFPCSourceDir then exit(true); Result:=false; - CfgCache:=CodeToolBoss.FPCDefinesCache.ConfigCaches.Find( + CfgCache:=CodeToolBoss.CompilerDefinesCache.ConfigCaches.Find( EnvironmentOptions.GetParsedCompilerFilename,'','','',true); FPCVer:=CfgCache.GetFPCVer; EnvironmentOptions.FPCSourceDirectory:=FPCSourceDirComboBox.Text; @@ -494,7 +494,7 @@ begin EnvironmentOptions.CompilerFilename:=CompilerPathComboBox.Text; NewCompilerFilename:=EnvironmentOptions.GetParsedCompilerFilename; Quality:=CheckCompilerQuality(NewCompilerFilename,Note, - CodeToolBoss.FPCDefinesCache.TestFilename); + CodeToolBoss.CompilerDefinesCache.TestFilename); if Quality<>sddqCompatible then begin if IDEMessageDialog(lisCCOWarningCaption, diff --git a/ide/idefpcinfo.pas b/ide/idefpcinfo.pas index 6c26d7e909..7a65e7ca3d 100644 --- a/ide/idefpcinfo.pas +++ b/ide/idefpcinfo.pas @@ -123,7 +123,7 @@ begin TargetCPU:=BuildBoss.GetTargetCPU; CompilerFilename:=LazarusIDE.GetFPCompilerFilename; FPCSrcDir:=EnvironmentOptions.GetParsedFPCSourceDirectory; // needs FPCVer macro - UnitSetCache:=CodeToolBoss.FPCDefinesCache.FindUnitSet( + UnitSetCache:=CodeToolBoss.CompilerDefinesCache.FindUnitSet( CompilerFilename,TargetOS,TargetCPU,'',FPCSrcDir,true); GatherFPCExecutable(UnitSetCache,sl); @@ -167,10 +167,10 @@ begin begin sl.Add('ERROR: design time event (lihtGetFPCFrontEndParams) failed to extend fpc front end parameters: "'+CompilerOptions+'"'); end; - Cfg:=CodeToolBoss.FPCDefinesCache.ConfigCaches.Find( + Cfg:=CodeToolBoss.CompilerDefinesCache.ConfigCaches.Find( CompilerFilename,CompilerOptions,'','',true); // fpc -i - ExtraOptions:=Cfg.GetFPCInfoCmdLineOptions(CodeToolBoss.FPCDefinesCache.ExtraOptions); + ExtraOptions:=Cfg.GetFPCInfoCmdLineOptions(CodeToolBoss.CompilerDefinesCache.ExtraOptions); Params:=Trim('-iTOTP '+ExtraOptions); WorkDir:=GetCurrentDirUTF8; sl.Add(CompilerFilename+' '+Params); @@ -188,13 +188,13 @@ begin // fpc -va TargetOS:=BuildBoss.GetTargetOS; TargetCPU:=BuildBoss.GetTargetCPU; - Cfg:=CodeToolBoss.FPCDefinesCache.ConfigCaches.Find( + Cfg:=CodeToolBoss.CompilerDefinesCache.ConfigCaches.Find( CompilerFilename,CompilerOptions,TargetOS,TargetCPU,true); - TestFilename:=CodeToolBoss.FPCDefinesCache.TestFilename; + TestFilename:=CodeToolBoss.CompilerDefinesCache.TestFilename; Filename:=ExtractFileName(TestFilename); WorkDir:=ExtractFilePath(TestFilename); sl.Add('The IDE asks the compiler with the following command for paths and macros:'); - ExtraOptions:=Cfg.GetFPCInfoCmdLineOptions(CodeToolBoss.FPCDefinesCache.ExtraOptions); + ExtraOptions:=Cfg.GetFPCInfoCmdLineOptions(CodeToolBoss.CompilerDefinesCache.ExtraOptions); Params:=Trim('-va '+ExtraOptions)+' '+Filename; sl.Add(CompilerFilename+' '+Params); sl.Add('Working directory: '+WorkDir); diff --git a/ide/ideinfodlg.pas b/ide/ideinfodlg.pas index c22da61996..992331d477 100644 --- a/ide/ideinfodlg.pas +++ b/ide/ideinfodlg.pas @@ -293,7 +293,7 @@ begin sl.Add('Default CompilerFilename='+EnvironmentOptions.CompilerFilename); sl.Add('Real Default CompilerFilename='+EnvironmentOptions.GetParsedCompilerFilename); if CheckCompilerQuality(EnvironmentOptions.GetParsedCompilerFilename,Note, - CodeToolBoss.FPCDefinesCache.TestFilename)<>sddqCompatible + CodeToolBoss.CompilerDefinesCache.TestFilename)<>sddqCompatible then sl.Add('WARNING: '+Note); @@ -301,7 +301,7 @@ begin sl.Add('Project CompilerFilename='+Project1.CompilerOptions.CompilerPath); sl.Add('Real Project CompilerFilename='+LazarusIDE.GetFPCompilerFilename); if CheckCompilerQuality(LazarusIDE.GetFPCompilerFilename,Note, - CodeToolBoss.FPCDefinesCache.TestFilename)<>sddqCompatible + CodeToolBoss.CompilerDefinesCache.TestFilename)<>sddqCompatible then sl.Add('WARNING: '+Note); end; @@ -311,7 +311,7 @@ begin sl.Add('FPC source directory='+EnvironmentOptions.FPCSourceDirectory); sl.Add('Real FPC source directory='+EnvironmentOptions.GetParsedFPCSourceDirectory); - CfgCache:=CodeToolBoss.FPCDefinesCache.ConfigCaches.Find( + CfgCache:=CodeToolBoss.CompilerDefinesCache.ConfigCaches.Find( LazarusIDE.GetFPCompilerFilename,'','','',true); if CheckFPCSrcDirQuality(EnvironmentOptions.GetParsedFPCSourceDirectory,Note, CfgCache.GetFPCVer)<>sddqCompatible diff --git a/ide/initialsetupdlgs.pas b/ide/initialsetupdlgs.pas index 3584ce851c..deeeaad5ab 100644 --- a/ide/initialsetupdlgs.pas +++ b/ide/initialsetupdlgs.pas @@ -845,7 +845,7 @@ var Files: TSDFileInfoList; begin Exclude(FFlags,sdfCompilerFilenameNeedsUpdate); - Files:=SearchCompilerCandidates(false,CodeToolBoss.FPCDefinesCache.TestFilename); + Files:=SearchCompilerCandidates(false,CodeToolBoss.CompilerDefinesCache.TestFilename); FreeAndNil(FCandidates[sddtCompilerFilename]); FCandidates[sddtCompilerFilename]:=Files; FillComboboxWithFileInfoList(CompilerComboBox,Files); @@ -980,14 +980,14 @@ begin //debugln(['TInitialSetupDialog.UpdateCompilerNote ',fLastParsedCompiler]); Quality:=CheckCompilerQuality(fLastParsedCompiler,Note, - CodeToolBoss.FPCDefinesCache.TestFilename); + CodeToolBoss.CompilerDefinesCache.TestFilename); if Quality<>sddqInvalid then begin - CodeToolBoss.FPCDefinesCache.ConfigCaches.Find( + CodeToolBoss.CompilerDefinesCache.ConfigCaches.Find( fLastParsedCompiler,'','','',true); // check compiler again - CfgCache:=CodeToolBoss.FPCDefinesCache.ConfigCaches.Find( + CfgCache:=CodeToolBoss.CompilerDefinesCache.ConfigCaches.Find( fLastParsedCompiler,'','','',true); - CfgCache.Update(CodeToolBoss.FPCDefinesCache.TestFilename); + CfgCache.Update(CodeToolBoss.CompilerDefinesCache.TestFilename); BuildBoss.SetBuildTargetIDE; end; diff --git a/ide/initialsetupproc.pas b/ide/initialsetupproc.pas index 50139f94e2..6632ddb9b7 100644 --- a/ide/initialsetupproc.pas +++ b/ide/initialsetupproc.pas @@ -361,7 +361,7 @@ begin if TestSrcFilename<>'' then begin - CfgCache:=CodeToolBoss.FPCDefinesCache.ConfigCaches.Find( + CfgCache:=CodeToolBoss.CompilerDefinesCache.ConfigCaches.Find( AFilename,'','','',true); if CfgCache.NeedsUpdate then CfgCache.Update(TestSrcFilename); @@ -549,7 +549,7 @@ begin end else begin debugln(' Searching compiler ...'); end; - List:=SearchCompilerCandidates(true, CodeToolBoss.FPCDefinesCache.TestFilename); + List:=SearchCompilerCandidates(true, CodeToolBoss.CompilerDefinesCache.TestFilename); try if (List=nil) or (List.BestDir.Quality=sddqInvalid) then begin debugln(['SetupCompilerFilename: no proper compiler found.']); @@ -621,7 +621,7 @@ begin if TestSrcFilename<>'' then begin - CfgCache:=CodeToolBoss.FPCDefinesCache.ConfigCaches.Find( + CfgCache:=CodeToolBoss.CompilerDefinesCache.ConfigCaches.Find( AFilename,'','','',true); if CfgCache.NeedsUpdate then CfgCache.Update(TestSrcFilename); diff --git a/ide/inspectchksumchangeddlg.pas b/ide/inspectchksumchangeddlg.pas index 7ed96d380c..640fb1da8e 100644 --- a/ide/inspectchksumchangeddlg.pas +++ b/ide/inspectchksumchangeddlg.pas @@ -296,7 +296,7 @@ begin // search in fpc unit paths UnitSetID:=CodeToolBoss.GetUnitSetIDForDirectory(''); if UnitSetID='' then exit; - UnitSet:=CodeToolBoss.FPCDefinesCache.FindUnitSetWithID(UnitSetID,HasChanged,false); + UnitSet:=CodeToolBoss.CompilerDefinesCache.FindUnitSetWithID(UnitSetID,HasChanged,false); if UnitSet=nil then exit; CfgCache:=UnitSet.GetConfigCache(false); if CfgCache=nil then exit; diff --git a/ide/lazarus.lpi b/ide/lazarus.lpi index a407616041..8745ef394a 100644 --- a/ide/lazarus.lpi +++ b/ide/lazarus.lpi @@ -1,7 +1,7 @@ - + @@ -39,10 +39,18 @@ - + + + + + + + + + @@ -323,6 +331,7 @@ + @@ -460,6 +469,7 @@ + @@ -467,6 +477,7 @@ + @@ -486,12 +497,14 @@ + + @@ -736,6 +749,7 @@ + @@ -831,6 +845,7 @@ + @@ -1130,6 +1145,7 @@ + @@ -1339,6 +1355,7 @@ + diff --git a/ide/lazbuild.lpr b/ide/lazbuild.lpr index b6e10ad4ad..3bcf2972a1 100644 --- a/ide/lazbuild.lpr +++ b/ide/lazbuild.lpr @@ -1220,14 +1220,14 @@ end; procedure TLazBuildApplication.SetupCodetools; begin // create a test unit needed to get from the compiler all macros and search paths - CodeToolBoss.FPCDefinesCache.TestFilename:=CreateCompilerTestPascalFilename; + CodeToolBoss.CompilerDefinesCache.TestFilename:=CreateCompilerTestPascalFilename; CodeToolBoss.SourceCache.OnEncodeSaving:=@OnCodeBufferEncodeSaving; CodeToolBoss.SourceCache.OnDecodeLoaded:=@OnCodeBufferDecodeLoaded; CodeToolBoss.SourceCache.DefaultEncoding:=EncodingUTF8; - MainBuildBoss.LoadFPCDefinesCaches; + MainBuildBoss.LoadCompilerDefinesCaches; // create a test unit needed to get from the compiler all macros and search paths - CodeToolBoss.FPCDefinesCache.TestFilename:=CreateCompilerTestPascalFilename; + CodeToolBoss.CompilerDefinesCache.TestFilename:=CreateCompilerTestPascalFilename; end; procedure TLazBuildApplication.SetupPackageSystem; diff --git a/ide/main.pp b/ide/main.pp index e173c3caae..2c2fa1d58d 100644 --- a/ide/main.pp +++ b/ide/main.pp @@ -1387,7 +1387,7 @@ begin // check compiler if (not ShowSetupDialog) and (CheckCompilerQuality(EnvironmentOptions.GetParsedCompilerFilename,Note, - CodeToolBoss.FPCDefinesCache.TestFilename)=sddqInvalid) + CodeToolBoss.CompilerDefinesCache.TestFilename)=sddqInvalid) then begin debugln(['Warning: (lazarus) invalid compiler: ',EnvironmentOptions.GetParsedCompilerFilename]); ShowSetupDialog:=true; @@ -1396,7 +1396,7 @@ begin // check FPC source directory if (not ShowSetupDialog) then begin - CfgCache:=CodeToolBoss.FPCDefinesCache.ConfigCaches.Find( + CfgCache:=CodeToolBoss.CompilerDefinesCache.ConfigCaches.Find( EnvironmentOptions.GetParsedCompilerFilename,'','','',true); if CheckFPCSrcDirQuality(EnvironmentOptions.GetParsedFPCSourceDirectory,Note, CfgCache.GetFPCVer)=sddqInvalid @@ -9146,7 +9146,7 @@ begin OpenEditorsOnCodeToolChange:=false; // load caches - MainBuildBoss.LoadFPCDefinesCaches; + MainBuildBoss.LoadCompilerDefinesCaches; CodeToolBoss.SourceCache.ExpirationTimeInDays:=365; CodeToolBoss.SourceCache.OnEncodeSaving:=@CodeBufferEncodeSaving; @@ -9164,7 +9164,7 @@ begin CodeToolsOpts.AssignTo(CodeToolBoss); // create a test unit needed to get from the compiler all macros and search paths - CodeToolBoss.FPCDefinesCache.TestFilename:=CreateCompilerTestPascalFilename; + CodeToolBoss.CompilerDefinesCache.TestFilename:=CreateCompilerTestPascalFilename; MainBuildBoss.UpdateEnglishErrorMsgFilename; // set global macros diff --git a/packager/packagesystem.pas b/packager/packagesystem.pas index 43dace821a..b67d4bd522 100644 --- a/packager/packagesystem.pas +++ b/packager/packagesystem.pas @@ -3306,7 +3306,7 @@ begin exit; UnitSetID:=CodeToolBoss.GetUnitSetIDForDirectory(Dir); if UnitSetID='' then exit; - Cache:=CodeToolBoss.FPCDefinesCache.FindUnitSetWithID(UnitSetID,HasChanged,false); + Cache:=CodeToolBoss.CompilerDefinesCache.FindUnitSetWithID(UnitSetID,HasChanged,false); if Cache=nil then exit; CfgCache:=Cache.GetConfigCache(false); if CfgCache=nil then exit;