]> git.proxmox.com Git - mirror_edk2.git/commitdiff
BaseTools: Pcd not used info should not in Module PCD section
authorYonghong Zhu <yonghong.zhu@intel.com>
Mon, 2 Apr 2018 03:15:27 +0000 (11:15 +0800)
committerYonghong Zhu <yonghong.zhu@intel.com>
Mon, 9 Apr 2018 06:05:01 +0000 (14:05 +0800)
Pcds in Conditional Directives and Pcds not used are Platform Level
info, it should not display in Module PCD Section.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
BaseTools/Source/Python/build/BuildReport.py

index 966a2aa5abf1a27fcd931ef5378d2d3b3c49ea06..6a79e23632809bbcc97df446bb64882b0e5eb2b0 100644 (file)
@@ -877,10 +877,11 @@ class PcdReport(object):
                     self.DscPcdDefault[(TokenCName, TokenSpaceGuidCName)] = DscDefaultValue\r
 \r
     def GenerateReport(self, File, ModulePcdSet):\r
-        if self.ConditionalPcds:\r
-            self.GenerateReportDetail(File, ModulePcdSet, 1)\r
-        if self.UnusedPcds:\r
-            self.GenerateReportDetail(File, ModulePcdSet, 2)\r
+        if not ModulePcdSet:\r
+            if self.ConditionalPcds:\r
+                self.GenerateReportDetail(File, ModulePcdSet, 1)\r
+            if self.UnusedPcds:\r
+                self.GenerateReportDetail(File, ModulePcdSet, 2)\r
         self.GenerateReportDetail(File, ModulePcdSet)\r
 \r
     ##\r
@@ -904,7 +905,7 @@ class PcdReport(object):
         elif ReportSubType == 2:\r
             PcdDict = self.UnusedPcds\r
 \r
-        if ModulePcdSet is None:\r
+        if not ModulePcdSet:\r
             FileWrite(File, gSectionStart)\r
             if ReportSubType == 1:\r
                 FileWrite(File, "Conditional Directives used by the build system")\r