\r
\r
\r
- SourcePcdDict = {'DynamicEx':[], 'PatchableInModule':[],'Dynamic':[],'FixedAtBuild':[]}\r
- BinaryPcdDict = {'DynamicEx':[], 'PatchableInModule':[]}\r
+ SourcePcdDict = {'DynamicEx':set(), 'PatchableInModule':set(),'Dynamic':set(),'FixedAtBuild':set()}\r
+ BinaryPcdDict = {'DynamicEx':set(), 'PatchableInModule':set()}\r
SourcePcdDict_Keys = SourcePcdDict.keys()\r
BinaryPcdDict_Keys = BinaryPcdDict.keys()\r
\r
\r
if 'DynamicEx' in BuildData.Pcds[key].Type:\r
if BuildData.IsBinaryModule:\r
- if (BuildData.Pcds[key].TokenCName, BuildData.Pcds[key].TokenSpaceGuidCName) not in BinaryPcdDict['DynamicEx']:\r
- BinaryPcdDict['DynamicEx'].append((BuildData.Pcds[key].TokenCName, BuildData.Pcds[key].TokenSpaceGuidCName))\r
+ BinaryPcdDict['DynamicEx'].add((BuildData.Pcds[key].TokenCName, BuildData.Pcds[key].TokenSpaceGuidCName))\r
else:\r
- if (BuildData.Pcds[key].TokenCName, BuildData.Pcds[key].TokenSpaceGuidCName) not in SourcePcdDict['DynamicEx']:\r
- SourcePcdDict['DynamicEx'].append((BuildData.Pcds[key].TokenCName, BuildData.Pcds[key].TokenSpaceGuidCName))\r
+ SourcePcdDict['DynamicEx'].add((BuildData.Pcds[key].TokenCName, BuildData.Pcds[key].TokenSpaceGuidCName))\r
\r
elif 'PatchableInModule' in BuildData.Pcds[key].Type:\r
if BuildData.MetaFile.Ext == '.inf':\r
if BuildData.IsBinaryModule:\r
- if (BuildData.Pcds[key].TokenCName, BuildData.Pcds[key].TokenSpaceGuidCName) not in BinaryPcdDict['PatchableInModule']:\r
- BinaryPcdDict['PatchableInModule'].append((BuildData.Pcds[key].TokenCName, BuildData.Pcds[key].TokenSpaceGuidCName))\r
+ BinaryPcdDict['PatchableInModule'].add((BuildData.Pcds[key].TokenCName, BuildData.Pcds[key].TokenSpaceGuidCName))\r
else:\r
- if (BuildData.Pcds[key].TokenCName, BuildData.Pcds[key].TokenSpaceGuidCName) not in SourcePcdDict['PatchableInModule']:\r
- SourcePcdDict['PatchableInModule'].append((BuildData.Pcds[key].TokenCName, BuildData.Pcds[key].TokenSpaceGuidCName))\r
+ SourcePcdDict['PatchableInModule'].add((BuildData.Pcds[key].TokenCName, BuildData.Pcds[key].TokenSpaceGuidCName))\r
\r
elif 'Dynamic' in BuildData.Pcds[key].Type:\r
- if (BuildData.Pcds[key].TokenCName, BuildData.Pcds[key].TokenSpaceGuidCName) not in SourcePcdDict['Dynamic']:\r
- SourcePcdDict['Dynamic'].append((BuildData.Pcds[key].TokenCName, BuildData.Pcds[key].TokenSpaceGuidCName))\r
+ SourcePcdDict['Dynamic'].add((BuildData.Pcds[key].TokenCName, BuildData.Pcds[key].TokenSpaceGuidCName))\r
elif 'FixedAtBuild' in BuildData.Pcds[key].Type:\r
- if (BuildData.Pcds[key].TokenCName, BuildData.Pcds[key].TokenSpaceGuidCName) not in SourcePcdDict['FixedAtBuild']:\r
- SourcePcdDict['FixedAtBuild'].append((BuildData.Pcds[key].TokenCName, BuildData.Pcds[key].TokenSpaceGuidCName))\r
+ SourcePcdDict['FixedAtBuild'].add((BuildData.Pcds[key].TokenCName, BuildData.Pcds[key].TokenSpaceGuidCName))\r
else:\r
pass\r
#\r
for i in SourcePcdDict_Keys:\r
for j in SourcePcdDict_Keys:\r
if i != j:\r
- IntersectionList = list(set(SourcePcdDict[i]).intersection(set(SourcePcdDict[j])))\r
- if len(IntersectionList) > 0:\r
+ Intersections = SourcePcdDict[i].intersection(SourcePcdDict[j])\r
+ if len(Intersections) > 0:\r
EdkLogger.error(\r
'build',\r
FORMAT_INVALID,\r
"Building modules from source INFs, following PCD use %s and %s access method. It must be corrected to use only one access method." % (i, j),\r
- ExtraData="%s" % '\n\t'.join([str(P[1]+'.'+P[0]) for P in IntersectionList])\r
+ ExtraData="%s" % '\n\t'.join([str(P[1]+'.'+P[0]) for P in Intersections])\r
)\r
else:\r
pass\r
for i in BinaryPcdDict_Keys:\r
for j in BinaryPcdDict_Keys:\r
if i != j:\r
- IntersectionList = list(set(BinaryPcdDict[i]).intersection(set(BinaryPcdDict[j])))\r
- for item in IntersectionList:\r
+ Intersections = BinaryPcdDict[i].intersection(BinaryPcdDict[j])\r
+ for item in Intersections:\r
NewPcd1 = (item[0] + '_' + i, item[1])\r
NewPcd2 = (item[0] + '_' + j, item[1])\r
if item not in GlobalData.MixedPcd:\r
for i in SourcePcdDict_Keys:\r
for j in BinaryPcdDict_Keys:\r
if i != j:\r
- IntersectionList = list(set(SourcePcdDict[i]).intersection(set(BinaryPcdDict[j])))\r
- for item in IntersectionList:\r
+ Intersections = SourcePcdDict[i].intersection(BinaryPcdDict[j])\r
+ for item in Intersections:\r
NewPcd1 = (item[0] + '_' + i, item[1])\r
NewPcd2 = (item[0] + '_' + j, item[1])\r
if item not in GlobalData.MixedPcd:\r