summaryrefslogtreecommitdiff
path: root/BaseTools
diff options
context:
space:
mode:
authorYonghong Zhu <yonghong.zhu@intel.com>2017-07-27 11:20:26 +0800
committerYonghong Zhu <yonghong.zhu@intel.com>2017-08-01 10:44:55 +0800
commitc65df5d9a14331d2b6d583359f1cf88c3b710d34 (patch)
tree9d618d5957b89a808fd8004411d663c4059ae1cb /BaseTools
parentfff2623cc2a5e3d85db201a4cf1ca8c595e20075 (diff)
downloadedk2-c65df5d9a14331d2b6d583359f1cf88c3b710d34.zip
edk2-c65df5d9a14331d2b6d583359f1cf88c3b710d34.tar.gz
edk2-c65df5d9a14331d2b6d583359f1cf88c3b710d34.tar.bz2
BaseTools: Fix the bug to correctly check Pcd type that in FDF file
We set Pcd value in FDF and used this Pcd as PatchableInModule type in module, it cause build report generate failure. because we incorrectly set the Pcd type during check whether the Pcd is used. Cc: Liming Gao <liming.gao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
Diffstat (limited to 'BaseTools')
-rw-r--r--BaseTools/Source/Python/build/BuildReport.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/BaseTools/Source/Python/build/BuildReport.py b/BaseTools/Source/Python/build/BuildReport.py
index a1ee43a..a7cbb6a 100644
--- a/BaseTools/Source/Python/build/BuildReport.py
+++ b/BaseTools/Source/Python/build/BuildReport.py
@@ -738,6 +738,13 @@ class PcdReport(object):
for item in Pa.Platform.Pcds:
Pcd = Pa.Platform.Pcds[item]
if not Pcd.Type:
+ # check the Pcd in FDF file, whether it is used in module first
+ for T in ["FixedAtBuild", "PatchableInModule", "FeatureFlag", "Dynamic", "DynamicEx"]:
+ PcdList = self.AllPcds.setdefault(Pcd.TokenSpaceGuidCName, {}).setdefault(T, [])
+ if Pcd in PcdList:
+ Pcd.Type = T
+ break
+ if not Pcd.Type:
PcdTypeFlag = False
for package in Pa.PackageList:
for T in ["FixedAtBuild", "PatchableInModule", "FeatureFlag", "Dynamic", "DynamicEx"]: