From ac4578af364916a8848453ad0f719e872b8782ec Mon Sep 17 00:00:00 2001 From: zhijufan Date: Sat, 1 Sep 2018 23:45:52 +0800 Subject: 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 Cc: Yonghong Zhu Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Zhiju.Fan Reviewed-by: Yonghong Zhu --- BaseTools/Source/Python/build/BuildReport.py | 3 +++ 1 file changed, 3 insertions(+) (limited to 'BaseTools/Source/Python') diff --git a/BaseTools/Source/Python/build/BuildReport.py b/BaseTools/Source/Python/build/BuildReport.py index deb88a7817..a598d64244 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: -- cgit v1.2.3