]> git.proxmox.com Git - mirror_edk2.git/commitdiff
BaseTools: Fix report flexible value issue
authorYunhua Feng <yunhuax.feng@intel.com>
Tue, 7 Aug 2018 06:23:32 +0000 (14:23 +0800)
committerYonghong Zhu <yonghong.zhu@intel.com>
Thu, 16 Aug 2018 01:35:27 +0000 (09:35 +0800)
Report flexible value in INF file encounter error

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

index 50717b7c86362a3d32456221b65cf4bdd0d699c7..deb88a78177b2e40cc254a49c3c115cb7c905cd1 100644 (file)
@@ -985,6 +985,11 @@ class PcdReport(object):
                         continue\r
                     InfDefaultValue, PcdValue = ModulePcdSet[Pcd.TokenCName, Pcd.TokenSpaceGuidCName, Type]\r
                     Pcd.DefaultValue = PcdValue\r
+                    if InfDefaultValue:\r
+                        try:\r
+                            InfDefaultValue = ValueExpressionEx(InfDefaultValue, Pcd.DatumType, self._GuidDict)(True)\r
+                        except BadExpression as InfDefaultValue:\r
+                            EdkLogger.error('BuildReport', FORMAT_INVALID, "PCD Value: %s, Type: %s" % (InfDefaultValue, Pcd.DatumType))\r
                     if InfDefaultValue == "":\r
                         InfDefaultValue = None\r
 \r