MetaFile_cache = {}\r
for Arch in self.ArchList:\r
Platform_cache[Arch] = self.BuildDatabase[self.MetaFile, Arch, Target, Toolchain]\r
- MetaFile_cache[Arch] = []\r
- for Pkey in Platform_cache[Arch].Modules.keys():\r
- MetaFile_cache[Arch].append(Platform_cache[Arch].Modules[Pkey].MetaFile)\r
+ MetaFile_cache[Arch] = set()\r
+ for Pkey in Platform_cache[Arch].Modules:\r
+ MetaFile_cache[Arch].add(Platform_cache[Arch].Modules[Pkey].MetaFile)\r
for Inf in self.FdfProfile.InfDict[key]:\r
ModuleFile = PathClass(NormPath(Inf), GlobalData.gWorkspace, Arch)\r
for Arch in self.ArchList:\r
for Arch in self.ArchList:\r
if Arch == key:\r
Platform = self.BuildDatabase[self.MetaFile, Arch, Target, Toolchain]\r
- MetaFileList = []\r
- for Pkey in Platform.Modules.keys():\r
- MetaFileList.append(Platform.Modules[Pkey].MetaFile)\r
+ MetaFileList = set()\r
+ for Pkey in Platform.Modules:\r
+ MetaFileList.add(Platform.Modules[Pkey].MetaFile)\r
for Inf in self.FdfProfile.InfDict[key]:\r
ModuleFile = PathClass(NormPath(Inf), GlobalData.gWorkspace, Arch)\r
if ModuleFile in MetaFileList:\r
ModuleData = self.BuildDatabase[ModuleFile, Arch, Target, Toolchain]\r
PkgSet.update(ModuleData.Packages)\r
Pkgs = list(PkgSet) + list(PGen.PackageList)\r
- DecPcds = {}\r
+ DecPcds = set()\r
DecPcdsKey = set()\r
for Pkg in Pkgs:\r
for Pcd in Pkg.Pcds:\r
- DecPcds[Pcd[0], Pcd[1]] = Pkg.Pcds[Pcd]\r
+ DecPcds.add((Pcd[0], Pcd[1]))\r
DecPcdsKey.add((Pcd[0], Pcd[1], Pcd[2]))\r
\r
Platform.SkuName = self.SkuId\r
\r
# for gathering error information\r
NoDatumTypePcdList = set()\r
- PcdNotInDb = []\r
- self._GuidValue = {}\r
FdfModuleList = []\r
for InfName in self._AsBuildInfList:\r
InfName = mws.join(self.WorkspaceDir, InfName)\r
if PcdFromModule.Type in GenC.gDynamicPcd and \\r
PcdFromModule.IsFromBinaryInf == False:\r
# Print warning message to let the developer make a determine.\r
- if PcdFromModule not in PcdNotInDb:\r
- PcdNotInDb.append(PcdFromModule)\r
continue\r
# If one of the Source built modules listed in the DSC is not listed in \r
# FDF modules, and the INF lists a PCD can only use the PcdsDynamicEx \r
# PCD as PcdsDynamicEx), then DO NOT break the build; DO NOT add the \r
# PCD to the Platform's PCD Database.\r
if PcdFromModule.Type in GenC.gDynamicExPcd:\r
- if PcdFromModule not in PcdNotInDb:\r
- PcdNotInDb.append(PcdFromModule)\r
continue\r
#\r
# If a dynamic PCD used by a PEM module/PEI module & DXE module,\r
self._ToolDefinitions[Tool][Attr] = Value\r
\r
ToolsDef = ''\r
- MakePath = ''\r
if GlobalData.gOptions.SilentMode and "MAKE" in self._ToolDefinitions:\r
if "FLAGS" not in self._ToolDefinitions["MAKE"]:\r
self._ToolDefinitions["MAKE"]["FLAGS"] = ""\r
\r
if Attr == "PATH":\r
# Don't put MAKE definition in the file\r
- if Tool == "MAKE":\r
- MakePath = Value\r
- else:\r
+ if Tool != "MAKE":\r
ToolsDef += "%s = %s\n" % (Tool, Value)\r
elif Attr != "DLL":\r
# Don't put MAKE definition in the file\r
## Create AsBuilt INF file the module\r
#\r
def CreateAsBuiltInf(self, IsOnlyCopy = False):\r
- self.OutputFile = []\r
+ self.OutputFile = set()\r
if IsOnlyCopy:\r
if GlobalData.gBinCacheDest:\r
self.CopyModuleToCache()\r
DebugDir = self.DebugDir.replace('\\', '/').strip('/')\r
for Item in self.CodaTargetList:\r
File = Item.Target.Path.replace('\\', '/').strip('/').replace(DebugDir, '').replace(OutputDir, '').strip('/')\r
- if File not in self.OutputFile:\r
- self.OutputFile.append(File)\r
+ self.OutputFile.add(File)\r
if os.path.isabs(File):\r
File = File.replace('\\', '/').strip('/').replace(OutputDir, '').strip('/')\r
if Item.Target.Ext.lower() == '.aml':\r
else:\r
AsBuiltInfDict['binary_item'] += ['BIN|' + File]\r
if self.DepexGenerated:\r
- if self.Name + '.depex' not in self.OutputFile:\r
- self.OutputFile.append(self.Name + '.depex')\r
+ self.OutputFile.add(self.Name + '.depex')\r
if self.ModuleType in ['PEIM']:\r
AsBuiltInfDict['binary_item'] += ['PEI_DEPEX|' + self.Name + '.depex']\r
if self.ModuleType in ['DXE_DRIVER', 'DXE_RUNTIME_DRIVER', 'DXE_SAL_DRIVER', 'UEFI_DRIVER']:\r
Bin = self._GenOffsetBin()\r
if Bin:\r
AsBuiltInfDict['binary_item'] += ['BIN|%s' % Bin]\r
- if Bin not in self.OutputFile:\r
- self.OutputFile.append(Bin)\r
+ self.OutputFile.add(Bin)\r
\r
for Root, Dirs, Files in os.walk(OutputDir):\r
for File in Files:\r
if File.lower().endswith('.pdb'):\r
AsBuiltInfDict['binary_item'] += ['DISPOSABLE|' + File]\r
- if File not in self.OutputFile:\r
- self.OutputFile.append(File)\r
+ self.OutputFile.add(File)\r
HeaderComments = self.Module.HeaderComments\r
StartPos = 0\r
for Index in range(len(HeaderComments)):\r