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.100; helo=mga07.intel.com; envelope-from=bob.c.feng@intel.com; receiver=edk2-devel@lists.01.org Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) (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 8F34D21195BFA for ; Wed, 2 Jan 2019 00:44:05 -0800 (PST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga105.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 02 Jan 2019 00:44:04 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.56,430,1539673200"; d="scan'208";a="288218850" Received: from shwdepsi1121.ccr.corp.intel.com ([10.239.158.47]) by orsmga005.jf.intel.com with ESMTP; 02 Jan 2019 00:44:03 -0800 From: BobCF To: edk2-devel@lists.01.org Cc: Bob Feng , Liming Gao Date: Wed, 2 Jan 2019 16:44:01 +0800 Message-Id: <20190102084401.1264-1-bob.c.feng@intel.com> X-Mailer: git-send-email 2.19.1.windows.1 MIME-Version: 1.0 Subject: [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: Wed, 02 Jan 2019 08:44:05 -0000 Content-Transfer-Encoding: 8bit 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 = 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