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.65; helo=mga03.intel.com; envelope-from=liming.gao@intel.com; receiver=edk2-devel@lists.01.org Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) (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 D41DB210C0CE7 for ; Sun, 22 Jul 2018 19:08:04 -0700 (PDT) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 22 Jul 2018 19:08:04 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.51,391,1526367600"; d="scan'208";a="76940755" Received: from fmsmsx106.amr.corp.intel.com ([10.18.124.204]) by orsmga002.jf.intel.com with ESMTP; 22 Jul 2018 19:08:04 -0700 Received: from fmsmsx116.amr.corp.intel.com (10.18.116.20) by FMSMSX106.amr.corp.intel.com (10.18.124.204) with Microsoft SMTP Server (TLS) id 14.3.319.2; Sun, 22 Jul 2018 19:08:03 -0700 Received: from shsmsx101.ccr.corp.intel.com (10.239.4.153) by fmsmsx116.amr.corp.intel.com (10.18.116.20) with Microsoft SMTP Server (TLS) id 14.3.319.2; Sun, 22 Jul 2018 19:08:03 -0700 Received: from shsmsx104.ccr.corp.intel.com ([169.254.5.81]) by SHSMSX101.ccr.corp.intel.com ([169.254.1.57]) with mapi id 14.03.0319.002; Mon, 23 Jul 2018 10:07:59 +0800 From: "Gao, Liming" To: "Feng, YunhuaX" , "edk2-devel@lists.01.org" Thread-Topic: [PATCH] BaseTools: Fix the different token with the same PCD Thread-Index: AdQf/nOaWMgqDIv2QaqhG1GpFnW5JgCK4NXw Date: Mon, 23 Jul 2018 02:07:58 +0000 Message-ID: <4A89E2EF3DFEDB4C8BFDE51014F606A14E2BF6E6@SHSMSX104.ccr.corp.intel.com> References: <47C64442C08CCD4089DC43B6B5E46BC48AADC8@shsmsx102.ccr.corp.intel.com> In-Reply-To: <47C64442C08CCD4089DC43B6B5E46BC48AADC8@shsmsx102.ccr.corp.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 Subject: Re: [PATCH] BaseTools: Fix the different token with the same PCD X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Jul 2018 02:08:06 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Liming Gao >-----Original Message----- >From: Feng, YunhuaX >Sent: Friday, July 20, 2018 3:52 PM >To: edk2-devel@lists.01.org >Cc: Zhu, Yonghong ; Gao, Liming > >Subject: [PATCH] BaseTools: Fix the different token with the same PCD > >If the different token with the same PCD names are used in the driver, >build can pass. If the different token with the same PCD name are used >in the different library, then the driver build will fail. The reason >is that the driver autogen.c is not generated correctly for the second >case. BaseTools should check the duplicated PCD name is the driver and >its linked libraries. > >Cc: Liming Gao >Cc: Yonghong Zhu >Contributed-under: TianoCore Contribution Agreement 1.1 >Signed-off-by: Yunhua Feng >--- > BaseTools/Source/Python/AutoGen/GenC.py | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >diff --git a/BaseTools/Source/Python/AutoGen/GenC.py >b/BaseTools/Source/Python/AutoGen/GenC.py >index 3b396491d0..97ae7bc77a 100644 >--- a/BaseTools/Source/Python/AutoGen/GenC.py >+++ b/BaseTools/Source/Python/AutoGen/GenC.py >@@ -935,11 +935,11 @@ def CreateModulePcdCode(Info, AutoGenC, >AutoGenH, Pcd): > > if Pcd.Type in PCD_DYNAMIC_EX_TYPE_SET: > if Info.IsLibrary: > PcdList =3D Info.LibraryPcdList > else: >- PcdList =3D Info.ModulePcdList >+ PcdList =3D Info.ModulePcdList + Info.LibraryPcdList > PcdExCNameTest =3D 0 > for PcdModule in PcdList: > if PcdModule.Type in PCD_DYNAMIC_EX_TYPE_SET and >Pcd.TokenCName =3D=3D PcdModule.TokenCName: > PcdExCNameTest +=3D 1 > # get out early once we found > 1... >-- >2.12.2.windows.2