diff options
author | Yunhua Feng <yunhuax.feng@intel.com> | 2018-07-16 16:05:42 +0800 |
---|---|---|
committer | Yonghong Zhu <yonghong.zhu@intel.com> | 2018-07-25 10:51:45 +0800 |
commit | 5df16ecb7fcfc611d35af494658e0793c16e687f (patch) | |
tree | affe4b66e4dd0ca20dd772fca127dba9d0d5ddf4 /BaseTools/Source/Python/build | |
parent | 0f78fd73496f26d45516f6c453a66f35edca6ab0 (diff) | |
download | edk2-5df16ecb7fcfc611d35af494658e0793c16e687f.tar.gz edk2-5df16ecb7fcfc611d35af494658e0793c16e687f.tar.bz2 edk2-5df16ecb7fcfc611d35af494658e0793c16e687f.zip |
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>
Diffstat (limited to 'BaseTools/Source/Python/build')
-rw-r--r-- | BaseTools/Source/Python/build/BuildReport.py | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/BaseTools/Source/Python/build/BuildReport.py b/BaseTools/Source/Python/build/BuildReport.py index 176a390fa3..27680019dc 100644 --- a/BaseTools/Source/Python/build/BuildReport.py +++ b/BaseTools/Source/Python/build/BuildReport.py @@ -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')
|