From b8920ccc3c8d4abca35bb78c5845666b14fa7eb4 Mon Sep 17 00:00:00 2001 From: "Feng, Bob C" Date: Wed, 2 Jan 2019 16:09:46 +0800 Subject: BaseTools: Report Error if use SET in Dsc Build tool do not support SET syntax in DSC. If the SET statement is used in DSC, build tool just ignore it. That behavior confused some users that they think SET statement works in DSC like in FDF. To avoid such confusion, build tool report ERROR if there is "SET" statement in Dsc file. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Bob Feng Cc: Liming Gao Reviewed-by: Cc: Liming Gao --- BaseTools/Source/Python/Workspace/MetaFileParser.py | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'BaseTools/Source') diff --git a/BaseTools/Source/Python/Workspace/MetaFileParser.py b/BaseTools/Source/Python/Workspace/MetaFileParser.py index 02c8d7bbb5..9e524fefa5 100644 --- a/BaseTools/Source/Python/Workspace/MetaFileParser.py +++ b/BaseTools/Source/Python/Workspace/MetaFileParser.py @@ -978,6 +978,11 @@ class DscParser(MetaFileParser): self._ItemType = SectionType self._ValueList = ['', '', ''] + # "SET pcd = pcd_expression" syntax is not supported in Dsc file. + if self._CurrentLine.upper().strip().startswith("SET "): + EdkLogger.error('Parser', FORMAT_INVALID, '''"SET pcd = pcd_expression" syntax is not support in Dsc file''', + ExtraData=self._CurrentLine, + File=self.MetaFile, Line=self._LineIndex + 1) self._SectionParser[SectionType](self) if self._ValueList is None: continue -- cgit v1.2.3