summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYonghong Zhu <yonghong.zhu@intel.com>2018-03-20 13:16:12 +0800
committerYonghong Zhu <yonghong.zhu@intel.com>2018-03-21 11:49:31 +0800
commitf67d8a58cd0cada27aa30dc8a7e3a2a92c13c55b (patch)
tree37ddab2d6f2999e5299c4d3f4bda3d43b0d3d116
parentdfdb3625ef808150d41e4b1c6c0e872b86d824da (diff)
downloadedk2-f67d8a58cd0cada27aa30dc8a7e3a2a92c13c55b.tar.gz
edk2-f67d8a58cd0cada27aa30dc8a7e3a2a92c13c55b.tar.bz2
edk2-f67d8a58cd0cada27aa30dc8a7e3a2a92c13c55b.zip
BaseTools: Fix bug for --pcd VOID* type when no max size is specified
when VOID* type non-structure pcd used in --pcd, and its max size is not specified in DSC or its value is hex value, build break due to the code int(Pcd.MaxDatumSize,10). Now this patch remove this code, because tool will calculate the size info in later phase. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com> (cherry picked from commit 29d521b9fa00045eb036c353e0b8f5ebe9c12a98)
-rw-r--r--BaseTools/Source/Python/Workspace/DscBuildData.py13
1 files changed, 0 insertions, 13 deletions
diff --git a/BaseTools/Source/Python/Workspace/DscBuildData.py b/BaseTools/Source/Python/Workspace/DscBuildData.py
index 87494df329..d60d491e10 100644
--- a/BaseTools/Source/Python/Workspace/DscBuildData.py
+++ b/BaseTools/Source/Python/Workspace/DscBuildData.py
@@ -1254,19 +1254,6 @@ class DscBuildData(PlatformBuildClassObject):
SkuInfo.HiiDefaultValue = NoFiledValues[(Pcd.TokenSpaceGuidCName,Pcd.TokenCName)][0]
for defaultstore in SkuInfo.DefaultStoreDict:
SkuInfo.DefaultStoreDict[defaultstore] = NoFiledValues[(Pcd.TokenSpaceGuidCName,Pcd.TokenCName)][0]
- if Pcd.DatumType == "VOID*":
- if Pcd.MaxDatumSize is None:
- Pcd.MaxDatumSize = '0'
- MaxSize = int(Pcd.MaxDatumSize,10)
- if Pcd.DefaultValue.startswith("{") and Pcd.DefaultValue.endswith("}"):
- MaxSize = max([len(Pcd.DefaultValue.split(",")),MaxSize])
- elif Pcd.DefaultValue.startswith("\"") or Pcd.DefaultValue.startswith("\'"):
- MaxSize = max([len(Pcd.DefaultValue)-2+1,MaxSize])
- elif Pcd.DefaultValue.startswith("L\""):
- MaxSize = max([2*(len(Pcd.DefaultValue)-3+1),MaxSize])
- else:
- MaxSize = max([len(Pcd.DefaultValue),MaxSize])
- Pcd.MaxDatumSize = str(MaxSize)
else:
PcdInDec = self.DecPcds.get((Name,Guid))
if PcdInDec: