* [Patch] BaseTools: Report Error if use SET in Dsc
@ 2019-01-02 8:44 BobCF
2019-01-11 0:59 ` Gao, Liming
0 siblings, 1 reply; 2+ messages in thread
From: BobCF @ 2019-01-02 8:44 UTC (permalink / raw)
To: edk2-devel; +Cc: Bob Feng, Liming Gao
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>
---
BaseTools/Source/Python/Workspace/MetaFileParser.py | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/BaseTools/Source/Python/Workspace/MetaFileParser.py b/BaseTools/Source/Python/Workspace/MetaFileParser.py
index 032220813b..19d8452a35 100644
--- a/BaseTools/Source/Python/Workspace/MetaFileParser.py
+++ b/BaseTools/Source/Python/Workspace/MetaFileParser.py
@@ -975,10 +975,15 @@ class DscParser(MetaFileParser):
else:
SectionType = self._SectionType
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
#
# Model, Value1, Value2, Value3, Arch, ModuleType, BelongsToItem=-1, BelongsToFile=-1,
--
2.19.1.windows.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [Patch] BaseTools: Report Error if use SET in Dsc
2019-01-02 8:44 [Patch] BaseTools: Report Error if use SET in Dsc BobCF
@ 2019-01-11 0:59 ` Gao, Liming
0 siblings, 0 replies; 2+ messages in thread
From: Gao, Liming @ 2019-01-11 0:59 UTC (permalink / raw)
To: Feng, Bob C, edk2-devel@lists.01.org
Reviewed-by: Liming Gao <liming.gao@intel.com>
>-----Original Message-----
>From: Feng, Bob C
>Sent: Wednesday, January 02, 2019 4:44 PM
>To: edk2-devel@lists.01.org
>Cc: Feng, Bob C <bob.c.feng@intel.com>; Gao, Liming <liming.gao@intel.com>
>Subject: [Patch] 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>
>---
> BaseTools/Source/Python/Workspace/MetaFileParser.py | 5 +++++
> 1 file changed, 5 insertions(+)
>
>diff --git a/BaseTools/Source/Python/Workspace/MetaFileParser.py
>b/BaseTools/Source/Python/Workspace/MetaFileParser.py
>index 032220813b..19d8452a35 100644
>--- a/BaseTools/Source/Python/Workspace/MetaFileParser.py
>+++ b/BaseTools/Source/Python/Workspace/MetaFileParser.py
>@@ -975,10 +975,15 @@ class DscParser(MetaFileParser):
> else:
> SectionType = self._SectionType
> 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
> #
> # Model, Value1, Value2, Value3, Arch, ModuleType, BelongsToItem=-1,
>BelongsToFile=-1,
>--
>2.19.1.windows.1
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-01-11 0:59 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-01-02 8:44 [Patch] BaseTools: Report Error if use SET in Dsc BobCF
2019-01-11 0:59 ` Gao, Liming
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox