From e7df35b2bc53aecaca0792398f5d0ad163e50abb Mon Sep 17 00:00:00 2001 From: "Feng, YunhuaX" Date: Fri, 13 Apr 2018 13:20:31 +0800 Subject: [PATCH] BaseTools: Fix one or more multiply defined symbols found issue 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 Reviewed-by: Yonghong Zhu --- 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 @@ -997,6 +997,7 @@ class InfBuildData(ModuleBuildClassObject): 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] @@ -1050,7 +1051,7 @@ class InfBuildData(ModuleBuildClassObject): # # "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 @@ -1142,7 +1143,7 @@ class InfBuildData(ModuleBuildClassObject): 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) -- 2.39.2