From 8aa4db4b807ea7de395acd4018a139745327e374 Mon Sep 17 00:00:00 2001 From: "Feng, Bob C" Date: Wed, 7 Feb 2018 10:01:59 +0800 Subject: 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 Cc: Liming Gao Reviewed-by: Liming Gao --- BaseTools/Source/Python/Workspace/DecBuildData.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'BaseTools/Source/Python/Workspace/DecBuildData.py') diff --git a/BaseTools/Source/Python/Workspace/DecBuildData.py b/BaseTools/Source/Python/Workspace/DecBuildData.py index 2266b0b7a6..99c3bf14f1 100644 --- a/BaseTools/Source/Python/Workspace/DecBuildData.py +++ b/BaseTools/Source/Python/Workspace/DecBuildData.py @@ -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, -- cgit v1.2.3