summaryrefslogtreecommitdiffstats
path: root/BaseTools/Source/Python/Workspace/DecBuildData.py
diff options
context:
space:
mode:
authorFeng, Bob C <bob.c.feng@intel.com>2018-02-07 10:01:59 +0800
committerLiming Gao <liming.gao@intel.com>2018-02-08 11:09:42 +0800
commit8aa4db4b807ea7de395acd4018a139745327e374 (patch)
tree4dda3b284ed27dd946e5dc0a9793cb3862540334 /BaseTools/Source/Python/Workspace/DecBuildData.py
parentc60d751b73108e6b1ffe94722ef3efcdbcf3151c (diff)
downloadedk2-8aa4db4b807ea7de395acd4018a139745327e374.tar.gz
edk2-8aa4db4b807ea7de395acd4018a139745327e374.tar.bz2
edk2-8aa4db4b807ea7de395acd4018a139745327e374.zip
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>
Diffstat (limited to 'BaseTools/Source/Python/Workspace/DecBuildData.py')
-rw-r--r--BaseTools/Source/Python/Workspace/DecBuildData.py7
1 files changed, 2 insertions, 5 deletions
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,