BaseTools: Fix a bug for Mixed Pcd value display in the report

the case is that override the mixed pcd value in DSC [Components]
section, the value display in the report is incorrect.

Cc: Liming Gao <liming.gao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
This commit is contained in:
Yonghong Zhu 2017-09-10 16:23:09 +08:00
parent 2f6ef874ac
commit aa9aa47e06
1 changed files with 11 additions and 1 deletions

View File

@ -2335,8 +2335,18 @@ class PlatformAutoGen(AutoGen):
if Module in self.Platform.Modules:
PlatformModule = self.Platform.Modules[str(Module)]
for Key in PlatformModule.Pcds:
Flag = False
if Key in Pcds:
self._OverridePcd(Pcds[Key], PlatformModule.Pcds[Key], Module)
ToPcd = Pcds[Key]
Flag = True
elif Key in GlobalData.MixedPcd:
for PcdItem in GlobalData.MixedPcd[Key]:
if PcdItem in Pcds:
ToPcd = Pcds[PcdItem]
Flag = True
break
if Flag:
self._OverridePcd(ToPcd, PlatformModule.Pcds[Key], Module)
return Pcds.values()
## Resolve library names to library modules