From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by mx.groups.io with SMTP id smtpd.web10.5518.1576635412601442071 for ; Tue, 17 Dec 2019 18:16:52 -0800 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: intel.com, ip: 134.134.136.126, mailfrom: bob.c.feng@intel.com) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by orsmga106.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 17 Dec 2019 18:16:52 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.69,327,1571727600"; d="scan'208";a="212567861" Received: from fmsmsx105.amr.corp.intel.com ([10.18.124.203]) by fmsmga007.fm.intel.com with ESMTP; 17 Dec 2019 18:16:51 -0800 Received: from fmsmsx153.amr.corp.intel.com (10.18.125.6) by FMSMSX105.amr.corp.intel.com (10.18.124.203) with Microsoft SMTP Server (TLS) id 14.3.439.0; Tue, 17 Dec 2019 18:16:51 -0800 Received: from shsmsx151.ccr.corp.intel.com (10.239.6.50) by FMSMSX153.amr.corp.intel.com (10.18.125.6) with Microsoft SMTP Server (TLS) id 14.3.439.0; Tue, 17 Dec 2019 18:16:51 -0800 Received: from shsmsx104.ccr.corp.intel.com ([169.254.5.90]) by SHSMSX151.ccr.corp.intel.com ([169.254.3.214]) with mapi id 14.03.0439.000; Wed, 18 Dec 2019 10:16:49 +0800 From: "Bob Feng" To: "Gao, Liming" , "devel@edk2.groups.io" CC: "Shi, Steven" Subject: Re: [edk2-devel] [Patch 1/1] BaseTools: Remove PCD_TOKEN define for FixedAtBuild PCD Thread-Topic: [edk2-devel] [Patch 1/1] BaseTools: Remove PCD_TOKEN define for FixedAtBuild PCD Thread-Index: AQHVtUghQ1zMJJAPNkWxO7KCVKtnCKe/JyvwgAAAacA= Date: Wed, 18 Dec 2019 02:16:49 +0000 Message-ID: <08650203BA1BD64D8AD9B6D5D74A85D16158416B@SHSMSX104.ccr.corp.intel.com> References: <20191218020854.49000-1-bob.c.feng@intel.com> <4A89E2EF3DFEDB4C8BFDE51014F606A14E567451@SHSMSX104.ccr.corp.intel.com> In-Reply-To: <4A89E2EF3DFEDB4C8BFDE51014F606A14E567451@SHSMSX104.ccr.corp.intel.com> Accept-Language: zh-CN, en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Return-Path: bob.c.feng@intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Yes. If Pcd type is not DynamicXXX, there is no PCD_TOKEN define generated. -----Original Message----- From: Gao, Liming=20 Sent: Wednesday, December 18, 2019 10:15 AM To: devel@edk2.groups.io; Feng, Bob C Cc: Shi, Steven Subject: RE: [edk2-devel] [Patch 1/1] BaseTools: Remove PCD_TOKEN define f= or FixedAtBuild PCD Bob: PatchInModule and FeaturePcd don't use Token. Does this patch remove the= token generation for them? Thanks Liming >-----Original Message----- >From: devel@edk2.groups.io [mailto:devel@edk2.groups.io] On Behalf Of=20 >Bob Feng >Sent: Wednesday, December 18, 2019 10:09 AM >To: devel@edk2.groups.io >Cc: Gao, Liming ; Shi, Steven=20 > >Subject: [edk2-devel] [Patch 1/1] BaseTools: Remove PCD_TOKEN define=20 >for FixedAtBuild PCD > >BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=3D2426 > >Build tool generate PCD_TOKEN_xxx Macro for FixedAtBuild Pcd in=20 >Autogen.c and Autogen.h but there is no code use that Macro, so this=20 >patch is going to remove this Macro from autogen files. > >This change can improve incremental build function. > >Cc: Liming Gao >Cc: Steven Shi >Signed-off-by: Bob Feng >--- > BaseTools/Source/Python/AutoGen/GenC.py | 6 ++++-- > 1 file changed, 4 insertions(+), 2 deletions(-) > >diff --git a/BaseTools/Source/Python/AutoGen/GenC.py >b/BaseTools/Source/Python/AutoGen/GenC.py >index 5e0d11e165a3..3ec1a950fadc 100755 >--- a/BaseTools/Source/Python/AutoGen/GenC.py >+++ b/BaseTools/Source/Python/AutoGen/GenC.py >@@ -911,11 +911,12 @@ def CreateModulePcdCode(Info, AutoGenC, AutoGenH,= =20 >Pcd): > EdkLogger.error("build", AUTOGEN_ERROR, > "No generated token number for=20 >%s.%s\n" % (Pcd.TokenSpaceGuidCName, TokenCName), > ExtraData=3D"[%s]" % str(Info)) > else: > TokenNumber =3D PcdTokenNumber[Pcd.TokenCName,=20 >Pcd.TokenSpaceGuidCName] >- AutoGenH.Append('\n#define %s %dU\n' % (PcdTokenName, >TokenNumber)) >+ if Pcd.Type in PCD_DYNAMIC_TYPE_SET: >+ AutoGenH.Append('\n#define %s %dU\n' % (PcdTokenName, >TokenNumber)) > > EdkLogger.debug(EdkLogger.DEBUG_3, "Creating code for " +=20 > TokenCName >+ "." + Pcd.TokenSpaceGuidCName) > if Pcd.Type not in gItemTypeStringDatabase: > EdkLogger.error("build", AUTOGEN_ERROR, > "Unknown PCD type [%s] of PCD %s.%s" %=20 >(Pcd.Type, Pcd.TokenSpaceGuidCName, TokenCName), @@ -1236,11 +1237,12=20 >@@ def CreateLibraryPcdCode(Info, AutoGenC, AutoGenH, Pcd): > AutoGenH.Append('#define %s(SizeOfBuffer, Buffer)=20 >LibPcdSetEx%sS(&%s, %s, (SizeOfBuffer), (Buffer))\n' %=20 >(SetModeStatusName, DatumSizeLib, Pcd.TokenSpaceGuidCName, >PcdTokenName)) > else: > AutoGenH.Append('#define %s(Value) LibPcdSetEx%s(&%s,= =20 >%s, (Value))\n' % (SetModeName, DatumSizeLib, Pcd.TokenSpaceGuidCName, >PcdTokenName)) > AutoGenH.Append('#define %s(Value) >LibPcdSetEx%sS(&%s, %s, (Value))\n' % (SetModeStatusName, DatumSizeLib,= =20 >Pcd.TokenSpaceGuidCName, PcdTokenName)) > else: >- AutoGenH.Append('#define _PCD_TOKEN_%s %dU\n' % (TokenCName, >TokenNumber)) >+ if Pcd.Type in PCD_DYNAMIC_TYPE_SET: >+ AutoGenH.Append('#define _PCD_TOKEN_%s %dU\n' % >(TokenCName, TokenNumber)) > if PcdItemType in PCD_DYNAMIC_TYPE_SET: > PcdList =3D [] > PcdCNameList =3D [] > PcdList.extend(Info.LibraryPcdList) > PcdList.extend(Info.ModulePcdList) >-- >2.20.1.windows.1 > > >