]> git.proxmox.com Git - mirror_edk2.git/commitdiff
BaseTools: Not compare the VOID* difference in the DSC and DEC file
authorYonghong Zhu <yonghong.zhu@intel.com>
Tue, 9 Oct 2018 08:12:35 +0000 (16:12 +0800)
committerYonghong Zhu <yonghong.zhu@intel.com>
Sat, 13 Oct 2018 02:07:16 +0000 (10:07 +0800)
For structure Pcd, the type defined in the DEC file is the struct name
while if this Pcd used in the DSC file, it should add VOID* keywords
when it have max size info. so this patch filter the type compare for
this case.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
BaseTools/Source/Python/Workspace/DscBuildData.py

index 02aae3a67ba4c7e3f1710caafe7accf2eb321f24..5ed879c8d7a919dc48f5c721df57b0d768c58e32 100644 (file)
@@ -937,7 +937,8 @@ class DscBuildData(PlatformBuildClassObject):
                 EdkLogger.error('build', FORMAT_INVALID, ErrStr, File=self.MetaFile, Line=LineNo,\r
                                 ExtraData="%s.%s" % (TokenSpaceGuid, PcdCName))\r
             if PcdType in (MODEL_PCD_DYNAMIC_DEFAULT, MODEL_PCD_DYNAMIC_EX_DEFAULT, MODEL_PCD_FIXED_AT_BUILD, MODEL_PCD_PATCHABLE_IN_MODULE):\r
-                if self._DecPcds[PcdCName, TokenSpaceGuid].DatumType.strip() != ValueList[1].strip():\r
+                if self._DecPcds[PcdCName, TokenSpaceGuid].DatumType.strip() in TAB_PCD_NUMERIC_TYPES_VOID \\r
+                 and self._DecPcds[PcdCName, TokenSpaceGuid].DatumType.strip() != ValueList[1].strip():\r
                     EdkLogger.error('build', FORMAT_INVALID, "Pcd datumtype used in DSC file is not the same as its declaration in DEC file.", File=self.MetaFile, Line=LineNo,\r
                                 ExtraData="%s.%s|%s" % (TokenSpaceGuid, PcdCName, Setting))\r
         if (TokenSpaceGuid + '.' + PcdCName) in GlobalData.gPlatformPcds:\r