From nobody Sun Feb 8 12:38:08 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) client-ip=66.175.222.12; envelope-from=bounce+27952+44125+1787277+3901457@groups.io; helo=web01.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+44125+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1563785747; cv=none; d=zoho.com; s=zohoarc; b=ewf/Pqy5+6CdQyUcjqMlY3JBjh78xuGR+PyxwTMKUEry/oAFNM9Ejmr3FHyiFrWEdyU33as8ihhOdk4GGQZCuRXYf1F6lyjhWoFAOGp6JZjl0g+JF4V0Xn4nnycIPIk3Azxhorf9TeeN0tW+XPspbj1WTQkutb7fENXEzQonzuc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1563785747; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Id:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To:ARC-Authentication-Results; bh=nOYnfS5BsaJuGX2ccQY6tLWx9tketXrMu/iEH9bCln4=; b=Irnx9hudRYtF1CbjInITwUNnssLyiOySBuuHAK5sCSGJWJwmg2hB7DANwFTN4ojPuQn5zyO1i5Bbe/PozxneUditZ73qN+iZbilKHS+GscXWuWe6Mgvp5j0HfAJj4zOU0I0cu8ohrzDeb10Om0Dw1gIhgwuH56ca0z9qhB8qcC8= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=pass; spf=pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+44125+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) header.from= Received: from web01.groups.io (web01.groups.io [66.175.222.12]) by mx.zohomail.com with SMTPS id 1563785747365554.0622242547076; Mon, 22 Jul 2019 01:55:47 -0700 (PDT) Return-Path: X-Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by groups.io with SMTP; Mon, 22 Jul 2019 01:55:46 -0700 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False X-Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 22 Jul 2019 01:51:43 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,294,1559545200"; d="scan'208";a="320624171" X-Received: from shwdepsi1121.ccr.corp.intel.com ([10.239.158.47]) by orsmga004.jf.intel.com with ESMTP; 22 Jul 2019 01:51:42 -0700 From: "Bob Feng" To: devel@edk2.groups.io Cc: Liming Gao , Bob Feng Subject: [edk2-devel] [Patch 2/9 V2] BaseTools: Split WorkspaceAutoGen._InitWorker into multiple functions Date: Mon, 22 Jul 2019 16:50:53 +0800 Message-Id: <20190722085100.20552-3-bob.c.feng@intel.com> In-Reply-To: <20190722085100.20552-1-bob.c.feng@intel.com> References: <20190722085100.20552-1-bob.c.feng@intel.com> MIME-Version: 1.0 Precedence: Bulk List-Unsubscribe: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,bob.c.feng@intel.com Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1563785746; bh=GwWq9V264k2CsAsxzT6p9VjflnzlwXSzFpaGzBLjYDI=; h=Cc:Date:From:Reply-To:Subject:To; b=Q9euPjqGHTi+QRy7so5BuDox+eesWDRwBRfYD0joyplhy8kp68zE4NnnQMcQ2Hzr/gn KHteTmBPrktPj/IS3ujFqh5ftuQ8th7O0h/+oGZTAGGa9VxJ1yFp2rgV1ubg7iKf1VVUX yuxs2tj0/KtWKQtzywhfYGvsM7+rkmYGlNE= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Type: text/plain; charset="utf-8" BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=3D1875 The WorkspaceAutoGen.__InitWorker function is too long, it's hard to read and understand. This patch is to separate the __InitWorker into multiple small ones. Cc: Liming Gao Signed-off-by: Bob Feng --- BaseTools/Source/Python/AutoGen/AutoGen.py | 247 +++++++++++++-------- 1 file changed, 152 insertions(+), 95 deletions(-) diff --git a/BaseTools/Source/Python/AutoGen/AutoGen.py b/BaseTools/Source/= Python/AutoGen/AutoGen.py index c5b3fbb0a87f..9e06bb942126 100644 --- a/BaseTools/Source/Python/AutoGen/AutoGen.py +++ b/BaseTools/Source/Python/AutoGen/AutoGen.py @@ -333,13 +333,58 @@ class WorkspaceAutoGen(AutoGen): self._GuidDict =3D {} =20 # there's many relative directory operations, so ... os.chdir(self.WorkspaceDir) =20 + self.MergeArch() + self.ValidateBuildTarget() + + EdkLogger.info("") + if self.ArchList: + EdkLogger.info('%-16s =3D %s' % ("Architecture(s)", ' '.join(s= elf.ArchList))) + EdkLogger.info('%-16s =3D %s' % ("Build target", self.BuildTarget)) + EdkLogger.info('%-16s =3D %s' % ("Toolchain", self.ToolChain)) + + EdkLogger.info('\n%-24s =3D %s' % ("Active Platform", self.Platfor= m)) + if BuildModule: + EdkLogger.info('%-24s =3D %s' % ("Active Module", BuildModule)) + + if self.FdfFile: + EdkLogger.info('%-24s =3D %s' % ("Flash Image Definition", sel= f.FdfFile)) + + EdkLogger.verbose("\nFLASH_DEFINITION =3D %s" % self.FdfFile) + + if Progress: + Progress.Start("\nProcessing meta-data") # - # Merge Arch + # Mark now build in AutoGen Phase # + GlobalData.gAutoGenPhase =3D True + self.ProcessModuleFromPdf() + self.ProcessPcdType() + self.ProcessMixedPcd() + self.GetPcdsFromFDF() + self.CollectAllPcds() + self.GeneratePkgLevelHash() + # + # Check PCDs token value conflict in each DEC file. + # + self._CheckAllPcdsTokenValueConflict() + # + # Check PCD type and definition between DSC and DEC + # + self._CheckPcdDefineAndType() + + self.CreateBuildOptionsFile() + self.CreatePcdTokenNumberFile() + self.CreateModuleHashInfo() + GlobalData.gAutoGenPhase =3D False + + # + # Merge Arch + # + def MergeArch(self): if not self.ArchList: ArchList =3D set(self.Platform.SupArchList) else: ArchList =3D set(self.ArchList) & set(self.Platform.SupArchLis= t) if not ArchList: @@ -349,57 +394,49 @@ class WorkspaceAutoGen(AutoGen): SkippedArchList =3D set(self.ArchList).symmetric_difference(se= t(self.Platform.SupArchList)) EdkLogger.verbose("\nArch [%s] is ignored because the platform= supports [%s] only!" % (" ".join(SkippedArchList), " ".join(self.= Platform.SupArchList))) self.ArchList =3D tuple(ArchList) =20 - # Validate build target + # Validate build target + def ValidateBuildTarget(self): if self.BuildTarget not in self.Platform.BuildTargets: EdkLogger.error("build", PARAMETER_INVALID, ExtraData=3D"Build target [%s] is not supporte= d by the platform. [Valid target: %s]" % (self.BuildTarget, " ".join(self.P= latform.BuildTargets))) - - - # parse FDF file to get PCDs in it, if any + @cached_property + def FdfProfile(self): if not self.FdfFile: self.FdfFile =3D self.Platform.FlashDefinition =20 - EdkLogger.info("") - if self.ArchList: - EdkLogger.info('%-16s =3D %s' % ("Architecture(s)", ' '.join(s= elf.ArchList))) - EdkLogger.info('%-16s =3D %s' % ("Build target", self.BuildTarget)) - EdkLogger.info('%-16s =3D %s' % ("Toolchain", self.ToolChain)) - - EdkLogger.info('\n%-24s =3D %s' % ("Active Platform", self.Platfor= m)) - if BuildModule: - EdkLogger.info('%-24s =3D %s' % ("Active Module", BuildModule)) - + FdfProfile =3D None if self.FdfFile: - EdkLogger.info('%-24s =3D %s' % ("Flash Image Definition", sel= f.FdfFile)) - - EdkLogger.verbose("\nFLASH_DEFINITION =3D %s" % self.FdfFile) - - if Progress: - Progress.Start("\nProcessing meta-data") - - if self.FdfFile: - # - # Mark now build in AutoGen Phase - # - GlobalData.gAutoGenPhase =3D True Fdf =3D FdfParser(self.FdfFile.Path) Fdf.ParseFile() GlobalData.gFdfParser =3D Fdf - GlobalData.gAutoGenPhase =3D False - PcdSet =3D Fdf.Profile.PcdDict if Fdf.CurrentFdName and Fdf.CurrentFdName in Fdf.Profile.FdDi= ct: FdDict =3D Fdf.Profile.FdDict[Fdf.CurrentFdName] for FdRegion in FdDict.RegionList: if str(FdRegion.RegionType) is 'FILE' and self.Platfor= m.VpdToolGuid in str(FdRegion.RegionDataList): if int(FdRegion.Offset) % 8 !=3D 0: EdkLogger.error("build", FORMAT_INVALID, 'The = VPD Base Address %s must be 8-byte aligned.' % (FdRegion.Offset)) - ModuleList =3D Fdf.Profile.InfList - self.FdfProfile =3D Fdf.Profile + FdfProfile =3D Fdf.Profile + else: + if self.FdTargetList: + EdkLogger.info("No flash definition file found. FD [%s] wi= ll be ignored." % " ".join(self.FdTargetList)) + self.FdTargetList =3D [] + if self.FvTargetList: + EdkLogger.info("No flash definition file found. FV [%s] wi= ll be ignored." % " ".join(self.FvTargetList)) + self.FvTargetList =3D [] + if self.CapTargetList: + EdkLogger.info("No flash definition file found. Capsule [%= s] will be ignored." % " ".join(self.CapTargetList)) + self.CapTargetList =3D [] + + return FdfProfile + + def ProcessModuleFromPdf(self): + + if self.FdfProfile: for fvname in self.FvTargetList: if fvname.upper() not in self.FdfProfile.FvDict: EdkLogger.error("build", OPTION_VALUE_INVALID, "No such an FV in FDF file: %s" % fvna= me) =20 @@ -407,64 +444,60 @@ class WorkspaceAutoGen(AutoGen): # but the path (self.MetaFile.Path) is the real path for key in self.FdfProfile.InfDict: if key =3D=3D 'ArchTBD': MetaFile_cache =3D defaultdict(set) for Arch in self.ArchList: - Current_Platform_cache =3D self.BuildDatabase[self= .MetaFile, Arch, Target, Toolchain] + Current_Platform_cache =3D self.BuildDatabase[self= .MetaFile, Arch, self.BuildTarget, self.ToolChain] for Pkey in Current_Platform_cache.Modules: MetaFile_cache[Arch].add(Current_Platform_cach= e.Modules[Pkey].MetaFile) for Inf in self.FdfProfile.InfDict[key]: ModuleFile =3D PathClass(NormPath(Inf), GlobalData= .gWorkspace, Arch) for Arch in self.ArchList: if ModuleFile in MetaFile_cache[Arch]: break else: - ModuleData =3D self.BuildDatabase[ModuleFile, = Arch, Target, Toolchain] + ModuleData =3D self.BuildDatabase[ModuleFile, = Arch, self.BuildTarget, self.ToolChain] if not ModuleData.IsBinaryModule: EdkLogger.error('build', PARSER_ERROR, "Mo= dule %s NOT found in DSC file; Is it really a binary module?" % ModuleFile) =20 else: for Arch in self.ArchList: if Arch =3D=3D key: - Platform =3D self.BuildDatabase[self.MetaFile,= Arch, Target, Toolchain] + Platform =3D self.BuildDatabase[self.MetaFile,= Arch, self.BuildTarget, self.ToolChain] MetaFileList =3D set() for Pkey in Platform.Modules: MetaFileList.add(Platform.Modules[Pkey].Me= taFile) for Inf in self.FdfProfile.InfDict[key]: ModuleFile =3D PathClass(NormPath(Inf), Gl= obalData.gWorkspace, Arch) if ModuleFile in MetaFileList: continue - ModuleData =3D self.BuildDatabase[ModuleFi= le, Arch, Target, Toolchain] + ModuleData =3D self.BuildDatabase[ModuleFi= le, Arch, self.BuildTarget, self.ToolChain] if not ModuleData.IsBinaryModule: EdkLogger.error('build', PARSER_ERROR,= "Module %s NOT found in DSC file; Is it really a binary module?" % ModuleF= ile) =20 - else: - PcdSet =3D {} - ModuleList =3D [] - self.FdfProfile =3D None - if self.FdTargetList: - EdkLogger.info("No flash definition file found. FD [%s] wi= ll be ignored." % " ".join(self.FdTargetList)) - self.FdTargetList =3D [] - if self.FvTargetList: - EdkLogger.info("No flash definition file found. FV [%s] wi= ll be ignored." % " ".join(self.FvTargetList)) - self.FvTargetList =3D [] - if self.CapTargetList: - EdkLogger.info("No flash definition file found. Capsule [%= s] will be ignored." % " ".join(self.CapTargetList)) - self.CapTargetList =3D [] - - # apply SKU and inject PCDs from Flash Definition file + + + # parse FDF file to get PCDs in it, if any + def GetPcdsFromFDF(self): + + if self.FdfProfile: + PcdSet =3D self.FdfProfile.PcdDict + # handle the mixed pcd in FDF file + for key in PcdSet: + if key in GlobalData.MixedPcd: + Value =3D PcdSet[key] + del PcdSet[key] + for item in GlobalData.MixedPcd[key]: + PcdSet[item] =3D Value + self.VerifyPcdDeclearation(PcdSet) + + def ProcessPcdType(self): for Arch in self.ArchList: - Platform =3D self.BuildDatabase[self.MetaFile, Arch, Target, T= oolchain] - PlatformPcds =3D Platform.Pcds - self._GuidDict =3D Platform._GuidDict - SourcePcdDict =3D {TAB_PCDS_DYNAMIC_EX:set(), TAB_PCDS_PATCHAB= LE_IN_MODULE:set(),TAB_PCDS_DYNAMIC:set(),TAB_PCDS_FIXED_AT_BUILD:set()} - BinaryPcdDict =3D {TAB_PCDS_DYNAMIC_EX:set(), TAB_PCDS_PATCHAB= LE_IN_MODULE:set()} - SourcePcdDict_Keys =3D SourcePcdDict.keys() - BinaryPcdDict_Keys =3D BinaryPcdDict.keys() - + Platform =3D self.BuildDatabase[self.MetaFile, Arch, self.Buil= dTarget, self.ToolChain] + Platform.Pcds # generate the SourcePcdDict and BinaryPcdDict - PGen =3D PlatformAutoGen(self, self.MetaFile, Target, Toolchai= n, Arch) + PGen =3D PlatformAutoGen(self, self.MetaFile, self.BuildTarget= , self.ToolChain, Arch) for BuildData in list(PGen.BuildDatabase._CACHE_.values()): if BuildData.Arch !=3D Arch: continue if BuildData.MetaFile.Ext =3D=3D '.inf': for key in BuildData.Pcds: @@ -483,11 +516,11 @@ class WorkspaceAutoGen(AutoGen): BuildData.Pcds[key].Type =3D PcdIn= Platform.Type BuildData.Pcds[key].Pending =3D Fa= lse else: #Pcd used in Library, Pcd Type from refere= nce module if Pcd Type is Pending if BuildData.Pcds[key].Pending: - MGen =3D ModuleAutoGen(self, BuildData= .MetaFile, Target, Toolchain, Arch, self.MetaFile) + MGen =3D ModuleAutoGen(self, BuildData= .MetaFile, self.BuildTarget, self.ToolChain, Arch, self.MetaFile) if MGen and MGen.IsLibrary: if MGen in PGen.LibraryAutoGenList: ReferenceModules =3D MGen.Refe= renceModules for ReferenceModule in Referen= ceModules: if ReferenceModule.MetaFil= e in Platform.Modules: @@ -497,10 +530,24 @@ class WorkspaceAutoGen(AutoGen): if PcdInReferenceM= odule.Type: BuildData.Pcds= [key].Type =3D PcdInReferenceModule.Type BuildData.Pcds= [key].Pending =3D False break =20 + def ProcessMixedPcd(self): + for Arch in self.ArchList: + SourcePcdDict =3D {TAB_PCDS_DYNAMIC_EX:set(), TAB_PCDS_PATCHAB= LE_IN_MODULE:set(),TAB_PCDS_DYNAMIC:set(),TAB_PCDS_FIXED_AT_BUILD:set()} + BinaryPcdDict =3D {TAB_PCDS_DYNAMIC_EX:set(), TAB_PCDS_PATCHAB= LE_IN_MODULE:set()} + SourcePcdDict_Keys =3D SourcePcdDict.keys() + BinaryPcdDict_Keys =3D BinaryPcdDict.keys() + + # generate the SourcePcdDict and BinaryPcdDict + PGen =3D PlatformAutoGen(self, self.MetaFile, self.BuildTarget= , self.ToolChain, Arch) + for BuildData in list(PGen.BuildDatabase._CACHE_.values()): + if BuildData.Arch !=3D Arch: + continue + if BuildData.MetaFile.Ext =3D=3D '.inf': + for key in BuildData.Pcds: if TAB_PCDS_DYNAMIC_EX in BuildData.Pcds[key].Type: if BuildData.IsBinaryModule: BinaryPcdDict[TAB_PCDS_DYNAMIC_EX].add((Bu= ildData.Pcds[key].TokenCName, BuildData.Pcds[key].TokenSpaceGuidCName)) else: SourcePcdDict[TAB_PCDS_DYNAMIC_EX].add((Bu= ildData.Pcds[key].TokenCName, BuildData.Pcds[key].TokenSpaceGuidCName)) @@ -514,12 +561,11 @@ class WorkspaceAutoGen(AutoGen): =20 elif TAB_PCDS_DYNAMIC in BuildData.Pcds[key].Type: SourcePcdDict[TAB_PCDS_DYNAMIC].add((BuildData= .Pcds[key].TokenCName, BuildData.Pcds[key].TokenSpaceGuidCName)) elif TAB_PCDS_FIXED_AT_BUILD in BuildData.Pcds[key= ].Type: SourcePcdDict[TAB_PCDS_FIXED_AT_BUILD].add((Bu= ildData.Pcds[key].TokenCName, BuildData.Pcds[key].TokenSpaceGuidCName)) - else: - pass + # # A PCD can only use one type for all source modules # for i in SourcePcdDict_Keys: for j in SourcePcdDict_Keys: @@ -588,27 +634,38 @@ class WorkspaceAutoGen(AutoGen): del BuildData.Pcds[key] BuildData.Pcds[newkey] =3D Value break break =20 - # handle the mixed pcd in FDF file - for key in PcdSet: - if key in GlobalData.MixedPcd: - Value =3D PcdSet[key] - del PcdSet[key] - for item in GlobalData.MixedPcd[key]: - PcdSet[item] =3D Value + #Collect package set information from INF of FDF + @cached_property + def PkgSet(self): + if not self.FdfFile: + self.FdfFile =3D self.Platform.FlashDefinition =20 - #Collect package set information from INF of FDF + if self.FdfFile: + ModuleList =3D self.FdfProfile.InfList + else: + ModuleList =3D [] + Pkgs =3D {} + for Arch in self.ArchList: + Platform =3D self.BuildDatabase[self.MetaFile, Arch, self.Buil= dTarget, self.ToolChain] + PGen =3D PlatformAutoGen(self, self.MetaFile, self.BuildTarget= , self.ToolChain, Arch) PkgSet =3D set() for Inf in ModuleList: ModuleFile =3D PathClass(NormPath(Inf), GlobalData.gWorksp= ace, Arch) if ModuleFile in Platform.Modules: continue - ModuleData =3D self.BuildDatabase[ModuleFile, Arch, Target= , Toolchain] + ModuleData =3D self.BuildDatabase[ModuleFile, Arch, self.B= uildTarget, self.ToolChain] PkgSet.update(ModuleData.Packages) - Pkgs =3D list(PkgSet) + list(PGen.PackageList) + Pkgs[Arch] =3D list(PkgSet) + list(PGen.PackageList) + return Pkgs + + def VerifyPcdDeclearation(self,PcdSet): + for Arch in self.ArchList: + Platform =3D self.BuildDatabase[self.MetaFile, Arch, self.Buil= dTarget, self.ToolChain] + Pkgs =3D self.PkgSet[Arch] DecPcds =3D set() DecPcdsKey =3D set() for Pkg in Pkgs: for Pcd in Pkg.Pcds: DecPcds.add((Pcd[0], Pcd[1])) @@ -636,37 +693,33 @@ class WorkspaceAutoGen(AutoGen): PARSER_ERROR, "Using Dynamic or DynamicEx type of PCD [%= s.%s] in FDF file is not allowed." % (Guid, Name), File =3D self.FdfProfile.PcdFileLineDict[N= ame, Guid, Fileds][0], Line =3D self.FdfProfile.PcdFileLineDict[N= ame, Guid, Fileds][1] ) + def CollectAllPcds(self): =20 - Pa =3D PlatformAutoGen(self, self.MetaFile, Target, Toolchain,= Arch) + for Arch in self.ArchList: + Pa =3D PlatformAutoGen(self, self.MetaFile, self.BuildTarget, = self.ToolChain, Arch) # # Explicitly collect platform's dynamic PCDs # Pa.CollectPlatformDynamicPcds() Pa.CollectFixedAtBuildPcds() self.AutoGenObjectList.append(Pa) =20 - # - # Generate Package level hash value - # + # + # Generate Package level hash value + # + def GeneratePkgLevelHash(self): + for Arch in self.ArchList: GlobalData.gPackageHash =3D {} if GlobalData.gUseHashCache: - for Pkg in Pkgs: + for Pkg in self.PkgSet[Arch]: self._GenPkgLevelHash(Pkg) =20 - # - # Check PCDs token value conflict in each DEC file. - # - self._CheckAllPcdsTokenValueConflict() - - # - # Check PCD type and definition between DSC and DEC - # - self._CheckPcdDefineAndType() =20 + def CreateBuildOptionsFile(self): # # Create BuildOptions Macro & PCD metafile, also add the Active Pl= atform and FDF file. # content =3D 'gCommandLineDefines: ' content +=3D str(GlobalData.gCommandLineDefines) @@ -681,27 +734,31 @@ class WorkspaceAutoGen(AutoGen): content +=3D 'Flash Image Definition: ' content +=3D str(self.FdfFile) content +=3D TAB_LINE_BREAK SaveFileOnChange(os.path.join(self.BuildDir, 'BuildOptions'), cont= ent, False) =20 + def CreatePcdTokenNumberFile(self): # # Create PcdToken Number file for Dynamic/DynamicEx Pcd. # PcdTokenNumber =3D 'PcdTokenNumber: ' - if Pa.PcdTokenNumber: - if Pa.DynamicPcdList: - for Pcd in Pa.DynamicPcdList: - PcdTokenNumber +=3D TAB_LINE_BREAK - PcdTokenNumber +=3D str((Pcd.TokenCName, Pcd.TokenSpac= eGuidCName)) - PcdTokenNumber +=3D ' : ' - PcdTokenNumber +=3D str(Pa.PcdTokenNumber[Pcd.TokenCNa= me, Pcd.TokenSpaceGuidCName]) + for Arch in self.ArchList: + Pa =3D PlatformAutoGen(self, self.MetaFile, self.BuildTarget, = self.ToolChain, Arch) + if Pa.PcdTokenNumber: + if Pa.DynamicPcdList: + for Pcd in Pa.DynamicPcdList: + PcdTokenNumber +=3D TAB_LINE_BREAK + PcdTokenNumber +=3D str((Pcd.TokenCName, Pcd.Token= SpaceGuidCName)) + PcdTokenNumber +=3D ' : ' + PcdTokenNumber +=3D str(Pa.PcdTokenNumber[Pcd.Toke= nCName, Pcd.TokenSpaceGuidCName]) SaveFileOnChange(os.path.join(self.BuildDir, 'PcdTokenNumber'), Pc= dTokenNumber, False) =20 + def CreateModuleHashInfo(self): # # Get set of workspace metafiles # - AllWorkSpaceMetaFiles =3D self._GetMetaFiles(Target, Toolchain, Ar= ch) + AllWorkSpaceMetaFiles =3D self._GetMetaFiles(self.BuildTarget, sel= f.ToolChain) =20 # # Retrieve latest modified time of all metafiles # SrcTimeStamp =3D 0 @@ -759,11 +816,11 @@ class WorkspaceAutoGen(AutoGen): f.close() m.update(Content) SaveFileOnChange(HashFile, m.hexdigest(), False) GlobalData.gPackageHash[Pkg.PackageName] =3D m.hexdigest() =20 - def _GetMetaFiles(self, Target, Toolchain, Arch): + def _GetMetaFiles(self, Target, Toolchain): AllWorkSpaceMetaFiles =3D set() # # add fdf # if self.FdfFile: --=20 2.20.1.windows.1 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#44125): https://edk2.groups.io/g/devel/message/44125 Mute This Topic: https://groups.io/mt/32556736/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-