From 34e733f2000cfad7645651fac9ab79a237b95481 Mon Sep 17 00:00:00 2001 From: "Feng, Bob C" Date: Thu, 1 Nov 2018 22:57:08 +0800 Subject: 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 Cc: Liming Gao Reviewed-by: Liming Gao --- BaseTools/Source/Python/Workspace/InfBuildData.py | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'BaseTools/Source/Python/Workspace/InfBuildData.py') 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): -- cgit v1.2.3