mirror of https://github.com/acidanthera/audk.git
BaseTools: Fix build report for *P and *M flag incorrectly
Flag *M for INF defined value and DSC components value Flag *P only for platform defined value 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
0f78fd7349
commit
5df16ecb7f
|
@ -963,6 +963,11 @@ class PcdReport(object):
|
|||
DecDefaultValue = self.DecPcdDefault.get((Pcd.TokenCName, Pcd.TokenSpaceGuidCName, DecType))
|
||||
DscDefaultValue = self.DscPcdDefault.get((Pcd.TokenCName, Pcd.TokenSpaceGuidCName))
|
||||
DscDefaultValBak = DscDefaultValue
|
||||
Field = ''
|
||||
for (CName, Guid, Field) in self.FdfPcdSet:
|
||||
if CName == PcdTokenCName and Guid == Key:
|
||||
DscDefaultValue = self.FdfPcdSet[(CName, Guid, Field)]
|
||||
break
|
||||
DscDefaultValue = self.FdfPcdSet.get((Pcd.TokenCName, Key), DscDefaultValue)
|
||||
if DscDefaultValue != DscDefaultValBak:
|
||||
try:
|
||||
|
@ -975,13 +980,14 @@ class PcdReport(object):
|
|||
PcdValue = DecDefaultValue
|
||||
if DscDefaultValue:
|
||||
PcdValue = DscDefaultValue
|
||||
Pcd.DefaultValue = PcdValue
|
||||
if ModulePcdSet is not None:
|
||||
if (Pcd.TokenCName, Pcd.TokenSpaceGuidCName, Type) not in ModulePcdSet:
|
||||
continue
|
||||
InfDefault, PcdValue = ModulePcdSet[Pcd.TokenCName, Pcd.TokenSpaceGuidCName, Type]
|
||||
InfDefaultValue, PcdValue = ModulePcdSet[Pcd.TokenCName, Pcd.TokenSpaceGuidCName, Type]
|
||||
Pcd.DefaultValue = PcdValue
|
||||
if InfDefault == "":
|
||||
InfDefault = None
|
||||
if InfDefaultValue == "":
|
||||
InfDefaultValue = None
|
||||
|
||||
BuildOptionMatch = False
|
||||
if GlobalData.BuildOptionPcd:
|
||||
|
@ -1084,13 +1090,15 @@ class PcdReport(object):
|
|||
#
|
||||
# Report PCD item according to their override relationship
|
||||
#
|
||||
if DecMatch and InfMatch:
|
||||
if DecMatch:
|
||||
self.PrintPcdValue(File, Pcd, PcdTokenCName, TypeName, IsStructure, DscMatch, DscDefaultValBak, InfMatch, InfDefaultValue, DecMatch, DecDefaultValue, ' ')
|
||||
elif InfDefaultValue and InfMatch:
|
||||
self.PrintPcdValue(File, Pcd, PcdTokenCName, TypeName, IsStructure, DscMatch, DscDefaultValBak, InfMatch, InfDefaultValue, DecMatch, DecDefaultValue, '*M')
|
||||
elif BuildOptionMatch:
|
||||
self.PrintPcdValue(File, Pcd, PcdTokenCName, TypeName, IsStructure, DscMatch, DscDefaultValBak, InfMatch, InfDefaultValue, DecMatch, DecDefaultValue, '*B')
|
||||
else:
|
||||
if DscMatch:
|
||||
if (Pcd.TokenCName, Key) in self.FdfPcdSet:
|
||||
if DscDefaultValue and DscMatch:
|
||||
if (Pcd.TokenCName, Key, Field) in self.FdfPcdSet:
|
||||
self.PrintPcdValue(File, Pcd, PcdTokenCName, TypeName, IsStructure, DscMatch, DscDefaultValBak, InfMatch, InfDefaultValue, DecMatch, DecDefaultValue, '*F')
|
||||
else:
|
||||
self.PrintPcdValue(File, Pcd, PcdTokenCName, TypeName, IsStructure, DscMatch, DscDefaultValBak, InfMatch, InfDefaultValue, DecMatch, DecDefaultValue, '*P')
|
||||
|
|
Loading…
Reference in New Issue