summaryrefslogtreecommitdiff
path: root/BaseTools
diff options
context:
space:
mode:
authorzhijufan <zhijux.fan@intel.com>2018-09-01 23:45:52 +0800
committerYonghong Zhu <yonghong.zhu@intel.com>2018-09-06 09:11:45 +0800
commitac4578af364916a8848453ad0f719e872b8782ec (patch)
treeecfc0522bec0111f666149bc9d67cfbb34bc625a /BaseTools
parente23d9c3ed86c12f93c9c432cf80add850911e44a (diff)
downloadedk2-ac4578af364916a8848453ad0f719e872b8782ec.zip
edk2-ac4578af364916a8848453ad0f719e872b8782ec.tar.gz
edk2-ac4578af364916a8848453ad0f719e872b8782ec.tar.bz2
BaseTools: Fix a bug about list the PCD in "not used" section
Defined a pcd in Ovmf.dec and used that pcd in AcpiPlatformDxe.inf, then assign a value to that pcd from DSC, then build Ovmf platform successfully. But this Pcd was wrongly listed into not used section in the report.txt file. Cc: Liming Gao <liming.gao@intel.com> Cc: Yonghong Zhu <yonghong.zhu@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Zhiju.Fan <zhijux.fan@intel.com> Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
Diffstat (limited to 'BaseTools')
-rw-r--r--BaseTools/Source/Python/build/BuildReport.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/BaseTools/Source/Python/build/BuildReport.py b/BaseTools/Source/Python/build/BuildReport.py
index deb88a7..a598d64 100644
--- a/BaseTools/Source/Python/build/BuildReport.py
+++ b/BaseTools/Source/Python/build/BuildReport.py
@@ -819,6 +819,9 @@ class PcdReport(object):
break
PcdList = self.AllPcds.setdefault(Pcd.TokenSpaceGuidCName, {}).setdefault(Pcd.Type, [])
+ UnusedPcdList = self.UnusedPcds.setdefault(Pcd.TokenSpaceGuidCName, {}).setdefault(Pcd.Type, [])
+ if Pcd in UnusedPcdList:
+ UnusedPcdList.remove(Pcd)
if Pcd not in PcdList and Pcd not in UnusedPcdFullList:
UnusedPcdFullList.append(Pcd)
if len(Pcd.TokenCName) > self.MaxLen: