summaryrefslogtreecommitdiffstats
path: root/BaseTools/Source/Python/build/BuildReport.py
diff options
context:
space:
mode:
authorYunhua Feng <yunhuax.feng@intel.com>2018-08-07 14:23:32 +0800
committerYonghong Zhu <yonghong.zhu@intel.com>2018-08-16 09:35:27 +0800
commitaf24640290a79e974710629db91fb39512d0b54b (patch)
tree9847350943a6fbde6e17ba535f1a57a97912c1cc /BaseTools/Source/Python/build/BuildReport.py
parentb2282e5369c10a26e8cbf125cc22032ba903d619 (diff)
downloadedk2-af24640290a79e974710629db91fb39512d0b54b.tar.gz
edk2-af24640290a79e974710629db91fb39512d0b54b.tar.bz2
edk2-af24640290a79e974710629db91fb39512d0b54b.zip
BaseTools: Fix report flexible value issue
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>
Diffstat (limited to 'BaseTools/Source/Python/build/BuildReport.py')
-rw-r--r--BaseTools/Source/Python/build/BuildReport.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/BaseTools/Source/Python/build/BuildReport.py b/BaseTools/Source/Python/build/BuildReport.py
index 50717b7c86..deb88a7817 100644
--- a/BaseTools/Source/Python/build/BuildReport.py
+++ b/BaseTools/Source/Python/build/BuildReport.py
@@ -985,6 +985,11 @@ class PcdReport(object):
continue
InfDefaultValue, PcdValue = ModulePcdSet[Pcd.TokenCName, Pcd.TokenSpaceGuidCName, Type]
Pcd.DefaultValue = PcdValue
+ if InfDefaultValue:
+ try:
+ InfDefaultValue = ValueExpressionEx(InfDefaultValue, Pcd.DatumType, self._GuidDict)(True)
+ except BadExpression as InfDefaultValue:
+ EdkLogger.error('BuildReport', FORMAT_INVALID, "PCD Value: %s, Type: %s" % (InfDefaultValue, Pcd.DatumType))
if InfDefaultValue == "":
InfDefaultValue = None