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.65, mailfrom: steven.shi@intel.com) Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by groups.io with SMTP; Mon, 24 Jun 2019 00:19:10 -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 orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 24 Jun 2019 00:19:10 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.63,411,1557212400"; d="scan'208";a="151866943" Received: from fmsmsx106.amr.corp.intel.com ([10.18.124.204]) by orsmga007.jf.intel.com with ESMTP; 24 Jun 2019 00:19:10 -0700 Received: from fmsmsx124.amr.corp.intel.com (10.18.125.39) by FMSMSX106.amr.corp.intel.com (10.18.124.204) with Microsoft SMTP Server (TLS) id 14.3.439.0; Mon, 24 Jun 2019 00:19:09 -0700 Received: from shsmsx101.ccr.corp.intel.com (10.239.4.153) by fmsmsx124.amr.corp.intel.com (10.18.125.39) with Microsoft SMTP Server (TLS) id 14.3.439.0; Mon, 24 Jun 2019 00:19:09 -0700 Received: from shsmsx102.ccr.corp.intel.com ([169.254.2.33]) by SHSMSX101.ccr.corp.intel.com ([169.254.1.104]) with mapi id 14.03.0439.000; Mon, 24 Jun 2019 15:19:07 +0800 From: "Steven Shi" To: "Feng, Bob C" , "devel@edk2.groups.io" CC: "Gao, Liming" , "Rodriguez, Christian" Subject: Re: [Patch 1/2] BaseTools: refine CreateAsBuiltInf function Thread-Topic: [Patch 1/2] BaseTools: refine CreateAsBuiltInf function Thread-Index: AQHVKi9ZIFirs6KUnE6NcFQRP2U5HqaqZSng Date: Mon, 24 Jun 2019 07:19:07 +0000 Message-ID: <06C8AB66E78EE34A949939824ABE2B314002D1F2@shsmsx102.ccr.corp.intel.com> References: <20190624015124.16544-1-bob.c.feng@intel.com> In-Reply-To: <20190624015124.16544-1-bob.c.feng@intel.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiMDFkYzFlN2UtMzg1Yi00ZjM1LTg4MTMtZjA2YzNlM2JkMDFhIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiTnVzZ3gyWVFyb0ttdmNUMCtaRmtGcDVlXC9KS3kzSWxOYTdweE1KOUZSSm0yR1NTZWd4MVwvNDVhZVQwS3F6ZXVuIn0= x-ctpclassification: CTP_NT dlp-product: dlpe-windows dlp-version: 11.2.0.6 dlp-reaction: no-action x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Return-Path: steven.shi@intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Steven Shi > -----Original Message----- > From: Feng, Bob C > Sent: Monday, June 24, 2019 9:51 AM > To: devel@edk2.groups.io > Cc: Gao, Liming ; Shi, Steven ; > Rodriguez, Christian ; Feng, Bob C > > Subject: [Patch 1/2] BaseTools: refine CreateAsBuiltInf function >=20 > BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=3D1932 > ModuleAutogen.CreateAsBuiltInf IsOnlyCopy parameter > and related function can be moved out of CreateAsBuiltInf, > so that CreateAsBuiltInf is more clean. >=20 > Cc: Liming Gao > Cc: Steven Shi > Cc: Christian Rodriguez > Signed-off-by: Bob Feng > --- > BaseTools/Source/Python/AutoGen/AutoGen.py | 5 +---- > BaseTools/Source/Python/build/build.py | 6 ++++-- > 2 files changed, 5 insertions(+), 6 deletions(-) >=20 > diff --git a/BaseTools/Source/Python/AutoGen/AutoGen.py > b/BaseTools/Source/Python/AutoGen/AutoGen.py > index f50941d422..45b81ed660 100644 > --- a/BaseTools/Source/Python/AutoGen/AutoGen.py > +++ b/BaseTools/Source/Python/AutoGen/AutoGen.py > @@ -3579,15 +3579,12 @@ class ModuleAutoGen(AutoGen): > fInputfile.close () > return OutputName >=20 > ## Create AsBuilt INF file the module > # > - def CreateAsBuiltInf(self, IsOnlyCopy =3D False): > + def CreateAsBuiltInf(self): > self.OutputFile =3D set() > - if IsOnlyCopy and GlobalData.gBinCacheDest: > - self.CopyModuleToCache() > - return >=20 > if self.IsAsBuiltInfCreated: > return >=20 > # Skip INF file generation for libraries > diff --git a/BaseTools/Source/Python/build/build.py > b/BaseTools/Source/Python/build/build.py > index 2dca3c7b34..3ece4d4c61 100644 > --- a/BaseTools/Source/Python/build/build.py > +++ b/BaseTools/Source/Python/build/build.py > @@ -2217,17 +2217,19 @@ class Build(): > all_mod_set =3D set() > for Module in self.BuildModules: > Module.CreateAsBuiltInf() > all_mod_set.add(Module) > for Module in self.HashSkipModules: > - Module.CreateAsBuiltInf(True) > + if GlobalData.gBinCacheDest: > + Module.CopyModuleToCache() > all_mod_set.add(Module) > for Module in all_mod_set: > for lib in Module.LibraryAutoGenList: > all_lib_set.add(lib) > for lib in all_lib_set: > - lib.CreateAsBuiltInf(True) > + if GlobalData.gBinCacheDest: > + lib.CopyModuleToCache() > all_lib_set.clear() > all_mod_set.clear() > self.BuildModules =3D [] > self.HashSkipModules =3D [] > ## Do some clean-up works when error occurred > -- > 2.20.1.windows.1