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.126; helo=mga18.intel.com; envelope-from=liming.gao@intel.com; receiver=edk2-devel@lists.01.org Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) (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 3418C2097F544 for ; Tue, 17 Jul 2018 19:53:38 -0700 (PDT) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga106.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 17 Jul 2018 19:53:37 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.51,368,1526367600"; d="scan'208";a="241152111" Received: from fmsmsx106.amr.corp.intel.com ([10.18.124.204]) by orsmga005.jf.intel.com with ESMTP; 17 Jul 2018 19:53:28 -0700 Received: from fmsmsx152.amr.corp.intel.com (10.18.125.5) by FMSMSX106.amr.corp.intel.com (10.18.124.204) with Microsoft SMTP Server (TLS) id 14.3.319.2; Tue, 17 Jul 2018 19:53:27 -0700 Received: from shsmsx151.ccr.corp.intel.com (10.239.6.50) by FMSMSX152.amr.corp.intel.com (10.18.125.5) with Microsoft SMTP Server (TLS) id 14.3.319.2; Tue, 17 Jul 2018 19:53:27 -0700 Received: from shsmsx104.ccr.corp.intel.com ([169.254.5.81]) by SHSMSX151.ccr.corp.intel.com ([169.254.3.6]) with mapi id 14.03.0319.002; Wed, 18 Jul 2018 10:53:24 +0800 From: "Gao, Liming" To: "Zhu, Yonghong" , "edk2-devel@lists.01.org" Thread-Topic: [edk2] [Patch] BaseTools: Remove the duplicate Pcd items Thread-Index: AQHUHXJ6vkYQgTrn3kKcxglIJ6T54aSUSd4g Date: Wed, 18 Jul 2018 02:53:23 +0000 Message-ID: <4A89E2EF3DFEDB4C8BFDE51014F606A14E2BCE84@SHSMSX104.ccr.corp.intel.com> References: <1531793020-11292-1-git-send-email-yonghong.zhu@intel.com> In-Reply-To: <1531793020-11292-1-git-send-email-yonghong.zhu@intel.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ctpclassification: CTP_NT x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiNTJmM2U3ODMtYWU2MS00NjJjLTljYjAtZGU4YWVlZTMyZjA3IiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiUkl1TGczb3l2TDRKb3U5S2lQTUFEM3Exd0tERUp0ZjFzcVBPb2pGUnZ6ZEJYZDZWTnVyaGY3ODdnZTI1bjBzTiJ9 dlp-product: dlpe-windows dlp-version: 11.0.200.100 dlp-reaction: no-action x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Subject: Re: [Patch] BaseTools: Remove the duplicate Pcd items 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: Wed, 18 Jul 2018 02:53:38 -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, July 17, 2018 10:04 AM > To: edk2-devel@lists.01.org > Subject: [edk2] [Patch] BaseTools: Remove the duplicate Pcd items >=20 > The case is the Pcd item both used in 1 module inf and 1 lib inf, and > in the DSC component section, it override the Pcd value. > In the module, the pcd value is the override value, but in the lib inf > the pcd value is the value that in the DSC PCD section's value, then it > cause the Pcd value is different in the module and lib. but actually we > only need use the Pcd value in the module to decide whether it use the > same value. >=20 > Contributed-under: TianoCore Contribution Agreement 1.0 > Signed-off-by: Yonghong Zhu > --- > BaseTools/Source/Python/AutoGen/AutoGen.py | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) >=20 > diff --git a/BaseTools/Source/Python/AutoGen/AutoGen.py b/BaseTools/Sourc= e/Python/AutoGen/AutoGen.py > index 289309f..cf53c2b 100644 > --- a/BaseTools/Source/Python/AutoGen/AutoGen.py > +++ b/BaseTools/Source/Python/AutoGen/AutoGen.py > @@ -1289,11 +1289,11 @@ class PlatformAutoGen(AutoGen): > def CollectFixedAtBuildPcds(self): > for LibAuto in self.LibraryAutoGenList: > FixedAtBuildPcds =3D {} > ShareFixedAtBuildPcdsSameValue =3D {} > for Module in LibAuto._ReferenceModules: > - for Pcd in Module.FixedAtBuildPcds + LibAuto.FixedAtBuil= dPcds: > + for Pcd in set(Module.FixedAtBuildPcds + LibAuto.FixedAt= BuildPcds): > DefaultValue =3D Pcd.DefaultValue > # Cover the case: DSC component override the Pcd val= ue and the Pcd only used in one Lib > if Pcd in Module.LibraryPcdList: > Index =3D Module.LibraryPcdList.index(Pcd) > DefaultValue =3D Module.LibraryPcdList[Index].De= faultValue > -- > 2.6.1.windows.1 >=20 > _______________________________________________ > edk2-devel mailing list > edk2-devel@lists.01.org > https://lists.01.org/mailman/listinfo/edk2-devel