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.100; helo=mga07.intel.com; envelope-from=yunhuax.feng@intel.com; receiver=edk2-devel@lists.01.org Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) (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 0664E226EAC67 for ; Thu, 12 Apr 2018 22:21:22 -0700 (PDT) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga105.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 12 Apr 2018 22:21:22 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.48,444,1517904000"; d="scan'208";a="220074568" Received: from shwdeopenpsi033.ccr.corp.intel.com ([10.239.49.40]) by fmsmga005.fm.intel.com with ESMTP; 12 Apr 2018 22:21:21 -0700 From: Yunhua Feng To: edk2-devel@lists.01.org Cc: Liming Gao , Yonghong Zhu Date: Fri, 13 Apr 2018 13:20:31 +0800 Message-Id: <20180413052031.10224-1-yunhuax.feng@intel.com> X-Mailer: git-send-email 2.12.2.windows.2 Subject: [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: Fri, 13 Apr 2018 05:21:23 -0000 self.Guids update with package Guids will generate multiply defined GUID symbols 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] = Comments # resolve PCD type, value, datum info, etc. by getting its definition from package + _GuidDict = self.Guids.copy() for PcdCName, TokenSpaceGuid in PcdList: PcdRealName = PcdCName Setting, LineNo = PcdDict[self._Arch, self.Platform, PcdCName, TokenSpaceGuid] if Setting is None: continue @@ -1048,11 +1049,11 @@ class InfBuildData(ModuleBuildClassObject): # if platform doesn't give its type, use 'lowest' one in the # following order, if any # # "FixedAtBuild", "PatchableInModule", "FeatureFlag", "Dynamic", "DynamicEx" # - self.Guids.update(Package.Guids) + _GuidDict.update(Package.Guids) PcdType = self._PCD_TYPE_STRING_[Type] if Type == MODEL_PCD_DYNAMIC: Pcd.Pending = True for T in ["FixedAtBuild", "PatchableInModule", "FeatureFlag", "Dynamic", "DynamicEx"]: if (PcdRealName, TokenSpaceGuid) in GlobalData.MixedPcd: @@ -1140,11 +1141,11 @@ class InfBuildData(ModuleBuildClassObject): Pcd.InfDefaultValue = Pcd.DefaultValue if Pcd.DefaultValue in [None, '']: Pcd.DefaultValue = PcdInPackage.DefaultValue else: try: - Pcd.DefaultValue = ValueExpressionEx(Pcd.DefaultValue, Pcd.DatumType, self.Guids)(True) + Pcd.DefaultValue = 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, Value), File=self.MetaFile, Line=LineNo) break else: -- 2.12.2.windows.2