BaseTools: Define and use a set for common list

share a set for both PEI module types

Cc: Liming Gao <liming.gao@intel.com>
Cc: Yonghong Zhu <yonghong.zhu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Jaben Carsey <jaben.carsey@intel.com>
Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
This commit is contained in:
Carsey, Jaben
2018-04-20 23:51:34 +08:00
committed by Yonghong Zhu
parent 8bb63e377b
commit 88c6c1b64c
3 changed files with 7 additions and 6 deletions

View File

@ -1430,7 +1430,7 @@ class PlatformAutoGen(AutoGen):
# used by DXE module, it should be stored in DXE PCD database.
# The default Phase is DXE
#
if M.ModuleType in [SUP_MODULE_PEIM, SUP_MODULE_PEI_CORE]:
if M.ModuleType in SUP_MODULE_SET_PEI:
PcdFromModule.Phase = "PEI"
if PcdFromModule not in self._DynaPcdList_:
self._DynaPcdList_.append(PcdFromModule)
@ -1472,7 +1472,7 @@ class PlatformAutoGen(AutoGen):
# make sure that the "VOID*" kind of datum has MaxDatumSize set
if PcdFromModule.DatumType == TAB_VOID and PcdFromModule.MaxDatumSize in [None, '']:
NoDatumTypePcdList.add("%s.%s [%s]" % (PcdFromModule.TokenSpaceGuidCName, PcdFromModule.TokenCName, InfName))
if M.ModuleType in [SUP_MODULE_PEIM, SUP_MODULE_PEI_CORE]:
if M.ModuleType in SUP_MODULE_SET_PEI:
PcdFromModule.Phase = "PEI"
if PcdFromModule not in self._DynaPcdList_ and PcdFromModule.Type in GenC.gDynamicExPcd:
self._DynaPcdList_.append(PcdFromModule)