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>
This commit is contained in:
@ -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):
|
||||
|
Reference in New Issue
Block a user