From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=192.55.52.151; helo=mga17.intel.com; envelope-from=yonghong.zhu@intel.com; receiver=edk2-devel@lists.01.org Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) (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 4CED12274F3CC for ; Sat, 14 Apr 2018 17:36:53 -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 fmsmga107.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 14 Apr 2018 17:36:52 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.48,452,1517904000"; d="scan'208";a="50836569" Received: from fmsmsx104.amr.corp.intel.com ([10.18.124.202]) by orsmga002.jf.intel.com with ESMTP; 14 Apr 2018 17:36:51 -0700 Received: from fmsmsx112.amr.corp.intel.com (10.18.116.6) by fmsmsx104.amr.corp.intel.com (10.18.124.202) with Microsoft SMTP Server (TLS) id 14.3.319.2; Sat, 14 Apr 2018 17:36:51 -0700 Received: from shsmsx104.ccr.corp.intel.com (10.239.4.70) by FMSMSX112.amr.corp.intel.com (10.18.116.6) with Microsoft SMTP Server (TLS) id 14.3.319.2; Sat, 14 Apr 2018 17:36:51 -0700 Received: from shsmsx103.ccr.corp.intel.com ([169.254.4.151]) by SHSMSX104.ccr.corp.intel.com ([169.254.5.239]) with mapi id 14.03.0319.002; Sun, 15 Apr 2018 08:36:49 +0800 From: "Zhu, Yonghong" To: "Feng, YunhuaX" , "edk2-devel@lists.01.org" CC: "Gao, Liming" , "Zhu, Yonghong" Thread-Topic: [PATCH 1/1] BaseTools: Fix one or more multiply defined symbols found issue Thread-Index: AQHT0udMoN6eiXlHGUOhPbbZmCOrJ6QA/bjQ Date: Sun, 15 Apr 2018 00:36:48 +0000 Message-ID: References: <20180413052031.10224-1-yunhuax.feng@intel.com> In-Reply-To: <20180413052031.10224-1-yunhuax.feng@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 1/1] BaseTools: Fix one or more multiply defined symbols found issue X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 15 Apr 2018 00:36:54 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Yonghong Zhu Best Regards, Zhu Yonghong -----Original Message----- From: Feng, YunhuaX=20 Sent: Friday, April 13, 2018 1:21 PM To: edk2-devel@lists.01.org Cc: Gao, Liming ; Zhu, Yonghong Subject: [PATCH 1/1] BaseTools: Fix one or more multiply defined symbols fo= und issue self.Guids update with package Guids will generate multiply defined GUID sy= mbols in AutoGen file Cc: Liming Gao Cc: Yonghong Zhu Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Yunhua Feng --- BaseTools/Source/Python/Workspace/InfBuildData.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/BaseTools/Source/Python/Workspace/InfBuildData.py b/BaseTools/= Source/Python/Workspace/InfBuildData.py index e10873ae59..38165cb8a7 100644 --- a/BaseTools/Source/Python/Workspace/InfBuildData.py +++ b/BaseTools/Source/Python/Workspace/InfBuildData.py @@ -995,10 +995,11 @@ class InfBuildData(ModuleBuildClassObject): for CmtRec in CommentRecords: Comments.append(CmtRec[0]) self._PcdComments[TokenSpaceGuid, PcdCName] =3D Comments =20 # resolve PCD type, value, datum info, etc. by getting its definit= ion from package + _GuidDict =3D self.Guids.copy() for PcdCName, TokenSpaceGuid in PcdList: PcdRealName =3D PcdCName Setting, LineNo =3D PcdDict[self._Arch, self.Platform, PcdCNam= e, TokenSpaceGuid] if Setting is None: continue @@ -1048,11 +1049,11 @@ class InfBuildData(ModuleBuildClassObject): # if platform doesn't give its type, use 'lowest' one in t= he # following order, if any # # "FixedAtBuild", "PatchableInModule", "FeatureFlag", "D= ynamic", "DynamicEx" # - self.Guids.update(Package.Guids) + _GuidDict.update(Package.Guids) PcdType =3D self._PCD_TYPE_STRING_[Type] if Type =3D=3D MODEL_PCD_DYNAMIC: Pcd.Pending =3D True for T in ["FixedAtBuild", "PatchableInModule", "Featur= eFlag", "Dynamic", "DynamicEx"]: if (PcdRealName, TokenSpaceGuid) in GlobalData.Mix= edPcd: @@ -1140,11 +1141,11 @@ class InfBuildData(ModuleBuildClassObject): Pcd.InfDefaultValue =3D Pcd.DefaultValue if Pcd.DefaultValue in [None, '']: Pcd.DefaultValue =3D PcdInPackage.DefaultValue else: try: - Pcd.DefaultValue =3D ValueExpressionEx(Pcd.Def= aultValue, Pcd.DatumType, self.Guids)(True) + Pcd.DefaultValue =3D=20 + ValueExpressionEx(Pcd.DefaultValue, Pcd.DatumType, _GuidDict)(True) except BadExpression, Value: EdkLogger.error('Parser', FORMAT_INVALID, 'PCD= [%s.%s] Value "%s", %s' %(TokenSpaceGuid, PcdRealName, Pcd.DefaultValue, V= alue), File=3Dself.MetaFile, Line=3DL= ineNo) break else: -- 2.12.2.windows.2