BaseTool: Fixed Pcd issues.
1. Check variable offset when merging Hii Pcds 2. Fixed the issue of Hii value inherit with default store. 3. Error handling for incorrect structure pcd declare. 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:
@ -389,6 +389,8 @@ class DecBuildData(PackageBuildClassObject):
|
||||
struct_pcd.AddDefaultValue(item.TokenCName, item.DefaultValue,self.MetaFile.File,LineNo)
|
||||
|
||||
struct_pcd.PackageDecs = dep_pkgs
|
||||
if not struct_pcd.StructuredPcdIncludeFile:
|
||||
EdkLogger.error("build", PCD_STRUCTURE_PCD_ERROR, "The structure Pcd %s.%s header file is not found in %s line %s \n" % (struct_pcd.TokenSpaceGuidCName, struct_pcd.TokenCName,self.MetaFile.File,LineNo ))
|
||||
|
||||
str_pcd_set.append(struct_pcd)
|
||||
|
||||
@ -423,11 +425,6 @@ class DecBuildData(PackageBuildClassObject):
|
||||
continue
|
||||
|
||||
DefaultValue, DatumType, TokenNumber = AnalyzePcdData(Setting)
|
||||
if DatumType not in [TAB_UINT8, TAB_UINT16, TAB_UINT32, TAB_UINT64, TAB_VOID, "BOOLEAN"]:
|
||||
StructPattern = re.compile(r'[_a-zA-Z][0-9A-Za-z_]*$')
|
||||
if StructPattern.match(DatumType) == None:
|
||||
EdkLogger.error('build', FORMAT_INVALID, "DatumType only support BOOLEAN, UINT8, UINT16, UINT32, UINT64, VOID* or a valid struct name.", File=self.MetaFile, Line=LineNo)
|
||||
|
||||
validateranges, validlists, expressions = self._RawData.GetValidExpression(TokenSpaceGuid, PcdCName)
|
||||
PcdObj = PcdClassObject(
|
||||
PcdCName,
|
||||
|
Reference in New Issue
Block a user