From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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 66C67203BF0E3 for ; Tue, 23 May 2017 19:49:07 -0700 (PDT) Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 23 May 2017 19:49:07 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.38,384,1491289200"; d="scan'208";a="1152037143" Received: from fmsmsx103.amr.corp.intel.com ([10.18.124.201]) by fmsmga001.fm.intel.com with ESMTP; 23 May 2017 19:49:06 -0700 Received: from fmsmsx155.amr.corp.intel.com (10.18.116.71) by FMSMSX103.amr.corp.intel.com (10.18.124.201) with Microsoft SMTP Server (TLS) id 14.3.319.2; Tue, 23 May 2017 19:49:06 -0700 Received: from shsmsx101.ccr.corp.intel.com (10.239.4.153) by FMSMSX155.amr.corp.intel.com (10.18.116.71) with Microsoft SMTP Server (TLS) id 14.3.319.2; Tue, 23 May 2017 19:49:06 -0700 Received: from shsmsx102.ccr.corp.intel.com ([169.254.2.246]) by SHSMSX101.ccr.corp.intel.com ([169.254.1.193]) with mapi id 14.03.0319.002; Wed, 24 May 2017 10:49:04 +0800 From: "Gao, Liming" To: "Zhu, Yonghong" , "edk2-devel@lists.01.org" Thread-Topic: [edk2] [Patch V2] BaseTools: Fix incremental build bug on DynamicPcd Token Generation Thread-Index: AQHS04/TO6L2fWffhUiLuP14vbIs66ICyXdw Date: Wed, 24 May 2017 02:49:03 +0000 Message-ID: <4A89E2EF3DFEDB4C8BFDE51014F606A14D7335C3@shsmsx102.ccr.corp.intel.com> References: <1495521768-8016-1-git-send-email-yonghong.zhu@intel.com> In-Reply-To: <1495521768-8016-1-git-send-email-yonghong.zhu@intel.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-version: 10.0.102.7 dlp-reaction: no-action x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Subject: Re: [Patch V2] BaseTools: Fix incremental build bug on DynamicPcd Token Generation X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 May 2017 02:49:07 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Liming Gao > -----Original Message----- > From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of Yo= nghong Zhu > Sent: Tuesday, May 23, 2017 2:43 PM > To: edk2-devel@lists.01.org > Cc: Gao, Liming > Subject: [edk2] [Patch V2] BaseTools: Fix incremental build bug on Dynami= cPcd Token Generation >=20 > During incremental build, we meet the bug that the different drivers use > the different token for the same DynamicPcd. >=20 > Cc: Liming Gao > Contributed-under: TianoCore Contribution Agreement 1.0 > Signed-off-by: Yonghong Zhu > --- > BaseTools/Source/Python/AutoGen/AutoGen.py | 17 +++++++++++++++++ > BaseTools/Source/Python/build/build.py | 4 ++-- > 2 files changed, 19 insertions(+), 2 deletions(-) >=20 > diff --git a/BaseTools/Source/Python/AutoGen/AutoGen.py b/BaseTools/Sourc= e/Python/AutoGen/AutoGen.py > index 736c1ae..fa6ec56 100644 > --- a/BaseTools/Source/Python/AutoGen/AutoGen.py > +++ b/BaseTools/Source/Python/AutoGen/AutoGen.py > @@ -669,10 +669,23 @@ class WorkspaceAutoGen(AutoGen): > content +=3D 'BuildOptionPcd: ' > content +=3D str(GlobalData.BuildOptionPcd) > SaveFileOnChange(os.path.join(self.BuildDir, 'BuildOptions'), co= ntent, False) >=20 > # > + # Create PcdToken Number file for Dynamic/DynamicEx Pcd. > + # > + PcdTokenNumber =3D 'PcdTokenNumber: ' > + if Pa.PcdTokenNumber: > + if Pa.DynamicPcdList: > + for Pcd in Pa.DynamicPcdList: > + PcdTokenNumber +=3D os.linesep > + PcdTokenNumber +=3D str((Pcd.TokenCName, Pcd.TokenSp= aceGuidCName)) > + PcdTokenNumber +=3D ' : ' > + PcdTokenNumber +=3D str(Pa.PcdTokenNumber[Pcd.TokenC= Name, Pcd.TokenSpaceGuidCName]) > + SaveFileOnChange(os.path.join(self.BuildDir, 'PcdTokenNumber'), = PcdTokenNumber, False) > + > + # > # Get set of workspace metafiles > # > AllWorkSpaceMetaFiles =3D self._GetMetaFiles(Target, Toolchain, = Arch) >=20 > # > @@ -722,10 +735,14 @@ class WorkspaceAutoGen(AutoGen): >=20 > # add BuildOption metafile > # > AllWorkSpaceMetaFiles.add(os.path.join(self.BuildDir, 'BuildOpti= ons')) >=20 > + # add PcdToken Number file for Dynamic/DynamicEx Pcd > + # > + AllWorkSpaceMetaFiles.add(os.path.join(self.BuildDir, 'PcdTokenN= umber')) > + > for Arch in self.ArchList: > Platform =3D self.BuildDatabase[self.MetaFile, Arch, Target,= Toolchain] > PGen =3D PlatformAutoGen(self, self.MetaFile, Target, Toolch= ain, Arch) >=20 > # > diff --git a/BaseTools/Source/Python/build/build.py b/BaseTools/Source/Py= thon/build/build.py > index bd14e27..fd94ae6 100644 > --- a/BaseTools/Source/Python/build/build.py > +++ b/BaseTools/Source/Python/build/build.py > @@ -1,10 +1,10 @@ > ## @file > # build a platform or a module > # > # Copyright (c) 2014, Hewlett-Packard Development Company, L.P.
> -# Copyright (c) 2007 - 2016, Intel Corporation. All rights reserved. > +# Copyright (c) 2007 - 2017, Intel Corporation. All rights reserved. > # > # This program and the accompanying materials > # are licensed and made available under the terms and conditions of the= BSD License > # which accompanies this distribution. The full text of the license ma= y be found at > # http://opensource.org/licenses/bsd-license.php > @@ -52,11 +52,11 @@ import Common.EdkLogger > import Common.GlobalData as GlobalData >=20 > # Version and Copyright > VersionNumber =3D "0.60" + ' ' + gBUILD_VERSION > __version__ =3D "%prog Version " + VersionNumber > -__copyright__ =3D "Copyright (c) 2007 - 2016, Intel Corporation All rig= hts reserved." > +__copyright__ =3D "Copyright (c) 2007 - 2017, Intel Corporation All rig= hts reserved." >=20 > ## standard targets of build command > gSupportedTarget =3D ['all', 'genc', 'genmake', 'modules', 'libraries', = 'fds', 'clean', 'cleanall', 'cleanlib', 'run'] >=20 > ## build configuration file > -- > 2.6.1.windows.1 >=20 > _______________________________________________ > edk2-devel mailing list > edk2-devel@lists.01.org > https://lists.01.org/mailman/listinfo/edk2-devel