From nobody Wed May 8 07:58:04 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; spf=none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) smtp.mailfrom=edk2-devel-bounces@lists.01.org; dmarc=fail(p=none dis=none) header.from=intel.com Return-Path: Received: from ml01.01.org (ml01.01.org [198.145.21.10]) by mx.zohomail.com with SMTPS id 1531793026530763.1083792710057; Mon, 16 Jul 2018 19:03:46 -0700 (PDT) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 0164920988779; Mon, 16 Jul 2018 19:03:46 -0700 (PDT) Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) (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 B542920988757 for ; Mon, 16 Jul 2018 19:03:44 -0700 (PDT) Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 16 Jul 2018 19:03:44 -0700 Received: from shwdeopenpsi168.ccr.corp.intel.com ([10.239.158.129]) by fmsmga005.fm.intel.com with ESMTP; 16 Jul 2018 19:03:43 -0700 X-Original-To: edk2-devel@lists.01.org Received-SPF: none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) client-ip=198.145.21.10; envelope-from=edk2-devel-bounces@lists.01.org; helo=ml01.01.org; Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=192.55.52.115; helo=mga14.intel.com; envelope-from=yonghong.zhu@intel.com; receiver=edk2-devel@lists.01.org X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.51,364,1526367600"; d="scan'208";a="245799892" From: Yonghong Zhu To: edk2-devel@lists.01.org Date: Tue, 17 Jul 2018 10:03:40 +0800 Message-Id: <1531793020-11292-1-git-send-email-yonghong.zhu@intel.com> X-Mailer: git-send-email 2.6.1.windows.1 Subject: [edk2] [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: , MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" X-ZohoMail: RSF_4 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" 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. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yonghong Zhu Reviewed-by: Liming Gao --- BaseTools/Source/Python/AutoGen/AutoGen.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/BaseTools/Source/Python/AutoGen/AutoGen.py b/BaseTools/Source/= 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.FixedAtBuildP= cds: + for Pcd in set(Module.FixedAtBuildPcds + LibAuto.FixedAtBu= ildPcds): DefaultValue =3D Pcd.DefaultValue # Cover the case: DSC component override the Pcd value= and the Pcd only used in one Lib if Pcd in Module.LibraryPcdList: Index =3D Module.LibraryPcdList.index(Pcd) DefaultValue =3D Module.LibraryPcdList[Index].Defa= ultValue --=20 2.6.1.windows.1 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel