From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=134.134.136.20; helo=mga02.intel.com; envelope-from=liming.gao@intel.com; receiver=edk2-devel@lists.01.org Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 4BEEA21962301 for ; Thu, 10 Jan 2019 16:59:46 -0800 (PST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 10 Jan 2019 16:59:45 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.56,463,1539673200"; d="scan'208";a="125138058" Received: from fmsmsx108.amr.corp.intel.com ([10.18.124.206]) by orsmga002.jf.intel.com with ESMTP; 10 Jan 2019 16:59:45 -0800 Received: from fmsmsx155.amr.corp.intel.com (10.18.116.71) by FMSMSX108.amr.corp.intel.com (10.18.124.206) with Microsoft SMTP Server (TLS) id 14.3.408.0; Thu, 10 Jan 2019 16:59:45 -0800 Received: from shsmsx102.ccr.corp.intel.com (10.239.4.154) by FMSMSX155.amr.corp.intel.com (10.18.116.71) with Microsoft SMTP Server (TLS) id 14.3.408.0; Thu, 10 Jan 2019 16:59:45 -0800 Received: from shsmsx152.ccr.corp.intel.com ([169.254.6.44]) by shsmsx102.ccr.corp.intel.com ([169.254.2.63]) with mapi id 14.03.0415.000; Fri, 11 Jan 2019 08:59:43 +0800 From: "Gao, Liming" To: "Feng, Bob C" , "edk2-devel@lists.01.org" Thread-Topic: [Patch] BaseTools: Report Error if use SET in Dsc Thread-Index: AQHUondjOHqDwreno0Sb0CXHe37dhqWpTOAw Date: Fri, 11 Jan 2019 00:59:42 +0000 Message-ID: <4A89E2EF3DFEDB4C8BFDE51014F606A14E3AF357@SHSMSX152.ccr.corp.intel.com> References: <20190102084401.1264-1-bob.c.feng@intel.com> In-Reply-To: <20190102084401.1264-1-bob.c.feng@intel.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Subject: Re: [Patch] BaseTools: Report Error if use SET in Dsc X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Jan 2019 00:59:46 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Liming Gao >-----Original Message----- >From: Feng, Bob C >Sent: Wednesday, January 02, 2019 4:44 PM >To: edk2-devel@lists.01.org >Cc: Feng, Bob C ; Gao, Liming >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 >Cc: Liming Gao >--- > 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 =3D self._SectionType > self._ItemType =3D SectionType > > self._ValueList =3D ['', '', ''] >+ # "SET pcd =3D pcd_expression" syntax is not supported in Dsc= file. >+ if self._CurrentLine.upper().strip().startswith("SET "): >+ EdkLogger.error('Parser', FORMAT_INVALID, '''"SET pcd =3D >pcd_expression" syntax is not support in Dsc file''', >+ ExtraData=3Dself._CurrentLine, >+ File=3Dself.MetaFile, Line=3Dself._LineIn= dex + 1) > self._SectionParser[SectionType](self) > if self._ValueList is None: > continue > # > # Model, Value1, Value2, Value3, Arch, ModuleType, BelongsToI= tem=3D-1, >BelongsToFile=3D-1, >-- >2.19.1.windows.1