EdkLogger.error("build", OPTION_VALUE_INVALID,\r
"No such an FV in FDF file: %s" % fvname)\r
\r
+ # In DSC file may use FILE_GUID to override the module, then in the Platform.Modules use FILE_GUIDmodule.inf as key,\r
+ # but the path (self.MetaFile.Path) is the real path\r
for key in self.FdfProfile.InfDict:\r
if key == 'ArchTBD':\r
Platform_cache = {}\r
+ 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
for Inf in self.FdfProfile.InfDict[key]:\r
ModuleFile = PathClass(NormPath(Inf), GlobalData.gWorkspace, Arch)\r
for Arch in self.ArchList:\r
- if ModuleFile in Platform_cache[Arch].Modules:\r
+ if ModuleFile in MetaFile_cache[Arch]:\r
break\r
else:\r
ModuleData = self.BuildDatabase[ModuleFile, Arch, Target, Toolchain]\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
for Inf in self.FdfProfile.InfDict[key]:\r
ModuleFile = PathClass(NormPath(Inf), GlobalData.gWorkspace, Arch)\r
- if ModuleFile in Platform.Modules:\r
+ if ModuleFile in MetaFileList:\r
continue\r
ModuleData = self.BuildDatabase[ModuleFile, Arch, Target, Toolchain]\r
if not ModuleData.IsBinaryModule:\r