diff options
author | Feng, Bob C <bob.c.feng@intel.com> | 2019-01-02 16:09:46 +0800 |
---|---|---|
committer | Feng, Bob C <bob.c.feng@intel.com> | 2019-01-11 10:51:19 +0800 |
commit | b8920ccc3c8d4abca35bb78c5845666b14fa7eb4 (patch) | |
tree | f3393b7abbab23c171fb0036b80ebb8b94c9e3f9 /BaseTools/Source/Python/Workspace | |
parent | b85c8fb4d4dee870b6f37d6f53b9229f47c31450 (diff) | |
download | edk2-b8920ccc3c8d4abca35bb78c5845666b14fa7eb4.tar.gz edk2-b8920ccc3c8d4abca35bb78c5845666b14fa7eb4.tar.bz2 edk2-b8920ccc3c8d4abca35bb78c5845666b14fa7eb4.zip |
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 <bob.c.feng@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Reviewed-by: Cc: Liming Gao <liming.gao@intel.com>
Diffstat (limited to 'BaseTools/Source/Python/Workspace')
-rw-r--r-- | BaseTools/Source/Python/Workspace/MetaFileParser.py | 5 |
1 files changed, 5 insertions, 0 deletions
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
|