]> git.proxmox.com Git - mirror_edk2.git/blobdiff - BaseTools/Source/Python/build/BuildReport.py
BaseTools: Fix the bug to correctly check Pcd type that in FDF file
[mirror_edk2.git] / BaseTools / Source / Python / build / BuildReport.py
index a1ee43aa26ed41d31b4f3613965876e4b4fe3db6..a7cbb6a98c28f8f3321e2c2779b672c3db6ded65 100644 (file)
@@ -737,6 +737,13 @@ class PcdReport(object):
             UnusedPcdFullList = []\r
             for item in Pa.Platform.Pcds:\r
                 Pcd = Pa.Platform.Pcds[item]\r
+                if not Pcd.Type:\r
+                    # check the Pcd in FDF file, whether it is used in module first\r
+                    for T in ["FixedAtBuild", "PatchableInModule", "FeatureFlag", "Dynamic", "DynamicEx"]:\r
+                        PcdList = self.AllPcds.setdefault(Pcd.TokenSpaceGuidCName, {}).setdefault(T, [])\r
+                        if Pcd in PcdList:\r
+                            Pcd.Type = T\r
+                            break\r
                 if not Pcd.Type:\r
                     PcdTypeFlag = False\r
                     for package in Pa.PackageList:\r