BaseTools: Sort PCD by token space first then by PcdCName
Sort PCD by token space first, then by PcdCName in the build report. Cc: Liming Gao <liming.gao@intel.com> Cc: Yonghong Zhu <yonghong.zhu@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Yunhua Feng <yunhuax.feng@intel.com> Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
This commit is contained in:
parent
8653ea2088
commit
238d9b5c64
|
@ -927,19 +927,23 @@ class PcdReport(object):
|
|||
FileWrite(File, gSubSectionStart)
|
||||
FileWrite(File, TAB_BRG_PCD)
|
||||
FileWrite(File, gSubSectionSep)
|
||||
|
||||
AllPcdDict = {}
|
||||
for Key in PcdDict:
|
||||
AllPcdDict[Key] = {}
|
||||
for Type in PcdDict[Key]:
|
||||
for Pcd in PcdDict[Key][Type]:
|
||||
AllPcdDict[Key][(Pcd.TokenCName, Type)] = Pcd
|
||||
for Key in sorted(AllPcdDict):
|
||||
#
|
||||
# Group PCD by their token space GUID C Name
|
||||
#
|
||||
First = True
|
||||
for Type in PcdDict[Key]:
|
||||
for PcdTokenCName, Type in sorted(AllPcdDict[Key]):
|
||||
#
|
||||
# Group PCD by their usage type
|
||||
#
|
||||
Pcd = AllPcdDict[Key][(PcdTokenCName, Type)]
|
||||
TypeName, DecType = gPcdTypeMap.get(Type, ("", Type))
|
||||
for Pcd in PcdDict[Key][Type]:
|
||||
PcdTokenCName = Pcd.TokenCName
|
||||
MixedPcdFlag = False
|
||||
if GlobalData.MixedPcd:
|
||||
for PcdKey in GlobalData.MixedPcd:
|
||||
|
@ -1106,11 +1110,11 @@ class PcdReport(object):
|
|||
continue
|
||||
IsByteArray, ArrayList = ByteArrayForamt(ModuleDefault.strip())
|
||||
if IsByteArray:
|
||||
FileWrite(File, ' *M %-*s = %s' % (self.MaxLen + 19, ModulePath, '{'))
|
||||
FileWrite(File, ' *M %-*s = %s' % (self.MaxLen + 15, ModulePath, '{'))
|
||||
for Array in ArrayList:
|
||||
FileWrite(File, '%s' % (Array))
|
||||
else:
|
||||
FileWrite(File, ' *M %-*s = %s' % (self.MaxLen + 19, ModulePath, ModuleDefault.strip()))
|
||||
FileWrite(File, ' *M %-*s = %s' % (self.MaxLen + 15, ModulePath, ModuleDefault.strip()))
|
||||
|
||||
if ModulePcdSet is None:
|
||||
FileWrite(File, gSectionEnd)
|
||||
|
|
Loading…
Reference in New Issue