Add the error check that A PCD can only use one type for all source
modules.
Cc: Liming Gao <liming.gao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
SourcePcdDict['FixedAtBuild'].append((BuildData.Pcds[key].TokenCName, BuildData.Pcds[key].TokenSpaceGuidCName))\r
else:\r
pass\r
SourcePcdDict['FixedAtBuild'].append((BuildData.Pcds[key].TokenCName, BuildData.Pcds[key].TokenSpaceGuidCName))\r
else:\r
pass\r
+ #\r
+ # A PCD can only use one type for all source modules\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
+ 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
+ )\r
+ else:\r
+ pass\r
\r
#\r
# intersection the BinaryPCD for Mixed PCD\r
\r
#\r
# intersection the BinaryPCD for Mixed PCD\r