summaryrefslogtreecommitdiff
path: root/BaseTools/Source/Python/build
diff options
context:
space:
mode:
authorYonghong Zhu <yonghong.zhu@intel.com>2016-04-15 16:46:48 +0800
committerHao Wu <hao.a.wu@intel.com>2016-07-13 09:32:05 +0800
commit4c4f3d120c989b4e8e31b50e1bdc7c9135a22597 (patch)
treea0012a561a3d7e8dc2b0ff8d200e7e8761d06dbc /BaseTools/Source/Python/build
parentfb78cbe3ed4759ef259bdc16cabb9c4e113edae0 (diff)
downloadedk2-platforms-4c4f3d120c989b4e8e31b50e1bdc7c9135a22597.tar.xz
BaseTools: enhance error handling for DSC file
Add logic for DSC file validation for Prebuild init. Add logic to detect error for DSC parser when '{' is missing. Cc: Liming Gao <liming.gao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com> (cherry picked from commit d429fcd0d25936ff5861e9c6e37f7cf9285217b2)
Diffstat (limited to 'BaseTools/Source/Python/build')
-rw-r--r--BaseTools/Source/Python/build/build.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/BaseTools/Source/Python/build/build.py b/BaseTools/Source/Python/build/build.py
index 37ce8e16aa..07891dafdb 100644
--- a/BaseTools/Source/Python/build/build.py
+++ b/BaseTools/Source/Python/build/build.py
@@ -920,6 +920,9 @@ class Build():
def InitPreBuild(self):
self.LoadConfiguration()
+ ErrorCode, ErrorInfo = self.PlatformFile.Validate(".dsc", False)
+ if ErrorCode != 0:
+ EdkLogger.error("build", ErrorCode, ExtraData=ErrorInfo)
if self.BuildTargetList:
GlobalData.gGlobalDefines['TARGET'] = self.BuildTargetList[0]
if self.ArchList: