summaryrefslogtreecommitdiffstats
path: root/BaseTools/Source/Python/Workspace/InfBuildData.py
diff options
context:
space:
mode:
authorFeng, Bob C <bob.c.feng@intel.com>2018-11-01 22:57:08 +0800
committerBobCF <bob.c.feng@intel.com>2018-12-07 10:03:02 +0800
commit34e733f2000cfad7645651fac9ab79a237b95481 (patch)
treeb83ddd7831a57137fe2377b4f94090da59256a70 /BaseTools/Source/Python/Workspace/InfBuildData.py
parent72a1d77694d51914c0dd6aa97dbfa58634b0a4a5 (diff)
downloadedk2-34e733f2000cfad7645651fac9ab79a237b95481.tar.gz
edk2-34e733f2000cfad7645651fac9ab79a237b95481.tar.bz2
edk2-34e733f2000cfad7645651fac9ab79a237b95481.zip
BaseTool: Filter out unused structure pcds
V2: Fixed the issue that V1 adds new check to the Pcds in the platform unused library INF files. It breaks the existing platform. V1? The current code handle all the structure pcds even if there is no module or library use them. This patch is going to filter out the unused structure pcds. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Bob Feng <bob.c.feng@intel.com> Cc: Liming Gao <liming.gao@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
Diffstat (limited to 'BaseTools/Source/Python/Workspace/InfBuildData.py')
-rw-r--r--BaseTools/Source/Python/Workspace/InfBuildData.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/BaseTools/Source/Python/Workspace/InfBuildData.py b/BaseTools/Source/Python/Workspace/InfBuildData.py
index 44d44d24eb..d10cfea40d 100644
--- a/BaseTools/Source/Python/Workspace/InfBuildData.py
+++ b/BaseTools/Source/Python/Workspace/InfBuildData.py
@@ -792,6 +792,15 @@ class InfBuildData(ModuleBuildClassObject):
RetVal.update(self._GetPcd(MODEL_PCD_DYNAMIC_EX))
return RetVal
+ @cached_property
+ def PcdsName(self):
+ PcdsName = set()
+ for Type in (MODEL_PCD_FIXED_AT_BUILD,MODEL_PCD_PATCHABLE_IN_MODULE,MODEL_PCD_FEATURE_FLAG,MODEL_PCD_DYNAMIC,MODEL_PCD_DYNAMIC_EX):
+ RecordList = self._RawData[Type, self._Arch, self._Platform]
+ for TokenSpaceGuid, PcdCName, _, _, _, _, _ in RecordList:
+ PcdsName.add((PcdCName, TokenSpaceGuid))
+ return PcdsName
+
## Retrieve build options specific to this module
@cached_property
def BuildOptions(self):