From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: intel.com, ip: 134.134.136.31, mailfrom: liming.gao@intel.com) Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by groups.io with SMTP; Mon, 08 Jul 2019 19:56:28 -0700 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga007.jf.intel.com ([10.7.209.58]) by orsmga104.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 08 Jul 2019 19:56:28 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.63,469,1557212400"; d="scan'208";a="156044879" Received: from fmsmsx104.amr.corp.intel.com ([10.18.124.202]) by orsmga007.jf.intel.com with ESMTP; 08 Jul 2019 19:56:28 -0700 Received: from fmsmsx161.amr.corp.intel.com (10.18.125.9) by fmsmsx104.amr.corp.intel.com (10.18.124.202) with Microsoft SMTP Server (TLS) id 14.3.439.0; Mon, 8 Jul 2019 19:56:27 -0700 Received: from shsmsx101.ccr.corp.intel.com (10.239.4.153) by FMSMSX161.amr.corp.intel.com (10.18.125.9) with Microsoft SMTP Server (TLS) id 14.3.439.0; Mon, 8 Jul 2019 19:56:27 -0700 Received: from shsmsx104.ccr.corp.intel.com ([169.254.5.110]) by SHSMSX101.ccr.corp.intel.com ([169.254.1.134]) with mapi id 14.03.0439.000; Tue, 9 Jul 2019 10:56:25 +0800 From: "Liming Gao" To: "Feng, Bob C" , "devel@edk2.groups.io" CC: "Kinney, Michael D" , "Shi, Steven" Subject: Re: [Patch 1/1] BaseTools: Detect the change of env variable used in tooldef.txt Thread-Topic: [Patch 1/1] BaseTools: Detect the change of env variable used in tooldef.txt Thread-Index: AQHVLWIkMBDTku/KCE+cdeKANxEN+6bBqQUg Date: Tue, 9 Jul 2019 02:56:25 +0000 Message-ID: <4A89E2EF3DFEDB4C8BFDE51014F606A14E4A4089@SHSMSX104.ccr.corp.intel.com> References: <20190628033227.14892-1-bob.c.feng@intel.com> In-Reply-To: <20190628033227.14892-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 Return-Path: liming.gao@intel.com 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: Friday, June 28, 2019 11:32 AM >To: devel@edk2.groups.io >Cc: Feng, Bob C ; Gao, Liming >; Kinney, Michael D ; >Shi, Steven >Subject: [Patch 1/1] BaseTools: Detect the change of env variable used in >tooldef.txt > >BZ:https://bugzilla.tianocore.org/show_bug.cgi?id=3D1921 > >Add TOOLS_DEF.ARCH file to all workspace meta files list. >TOOLS_DEF.ARCH include the evaluated Tool definition information >which is filtered by current tool_chain. > >With this change, when the environment variable which >is used in ToolDef.txt is changed, build tool will >rebuild the platform. > >Signed-off-by: Bob Feng >Cc: Liming Gao >Cc: Michael D Kinney >Cc: Steven Shi >--- > BaseTools/Source/Python/AutoGen/AutoGen.py | 7 +++++-- > 1 file changed, 5 insertions(+), 2 deletions(-) > >diff --git a/BaseTools/Source/Python/AutoGen/AutoGen.py >b/BaseTools/Source/Python/AutoGen/AutoGen.py >index e8e09dc8a366..24592593c868 100644 >--- a/BaseTools/Source/Python/AutoGen/AutoGen.py >+++ b/BaseTools/Source/Python/AutoGen/AutoGen.py >@@ -792,10 +792,13 @@ class WorkspaceAutoGen(AutoGen): > > # add PcdToken Number file for Dynamic/DynamicEx Pcd > # > AllWorkSpaceMetaFiles.add(os.path.join(self.BuildDir, >'PcdTokenNumber')) > >+ for Pa in self.AutoGenObjectList: >+ AllWorkSpaceMetaFiles.add(Pa.ToolDefinitionFile) >+ > for Arch in self.ArchList: > # > # add dec > # > for Package in PlatformAutoGen(self, self.MetaFile, Target, T= oolchain, >Arch).PackageList: >@@ -1859,11 +1862,11 @@ class PlatformAutoGen(AutoGen): > def ToolDefinition(self): > ToolDefinition =3D self.Workspace.ToolDef.ToolsDefTxtDictionary > if TAB_TOD_DEFINES_COMMAND_TYPE not in >self.Workspace.ToolDef.ToolsDefTxtDatabase: > EdkLogger.error('build', RESOURCE_NOT_AVAILABLE, "No tools fo= und >in configuration", > ExtraData=3D"[%s]" % self.MetaFile) >- RetVal =3D {} >+ RetVal =3D OrderedDict() > DllPathList =3D set() > for Def in ToolDefinition: > Target, Tag, Arch, Tool, Attr =3D Def.split("_") > if Target !=3D self.BuildTarget or Tag !=3D self.ToolChain or= Arch !=3D self.Arch: > continue >@@ -1873,11 +1876,11 @@ class PlatformAutoGen(AutoGen): > if Attr =3D=3D "DLL": > DllPathList.add(Value) > continue > > if Tool not in RetVal: >- RetVal[Tool] =3D {} >+ RetVal[Tool] =3D OrderedDict() > RetVal[Tool][Attr] =3D Value > > ToolsDef =3D '' > if GlobalData.gOptions.SilentMode and "MAKE" in RetVal: > if "FLAGS" not in RetVal["MAKE"]: >-- >2.20.1.windows.1