diff options
author | Yonghong Zhu <yonghong.zhu@intel.com> | 2017-05-03 15:19:21 +0800 |
---|---|---|
committer | Yonghong Zhu <yonghong.zhu@intel.com> | 2017-05-06 23:27:07 +0800 |
commit | 97cdb33b575a80ca5c20ad862331f3c6d9415575 (patch) | |
tree | 453d8a0709e5fcca42bfcd74aa079f549dcdaad2 | |
parent | 0c79471d6a986b858c35dc577eaeb344cc5c4cdd (diff) | |
download | edk2-97cdb33b575a80ca5c20ad862331f3c6d9415575.tar.gz edk2-97cdb33b575a80ca5c20ad862331f3c6d9415575.tar.bz2 edk2-97cdb33b575a80ca5c20ad862331f3c6d9415575.zip |
BaseTools: PCD can only use single access method by source build
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>
-rw-r--r-- | BaseTools/Source/Python/AutoGen/AutoGen.py | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/BaseTools/Source/Python/AutoGen/AutoGen.py b/BaseTools/Source/Python/AutoGen/AutoGen.py index 8075afc91d..205a75dc80 100644 --- a/BaseTools/Source/Python/AutoGen/AutoGen.py +++ b/BaseTools/Source/Python/AutoGen/AutoGen.py @@ -504,6 +504,22 @@ class WorkspaceAutoGen(AutoGen): SourcePcdDict['FixedAtBuild'].append((BuildData.Pcds[key].TokenCName, BuildData.Pcds[key].TokenSpaceGuidCName))
else:
pass
+ #
+ # A PCD can only use one type for all source modules
+ #
+ for i in SourcePcdDict_Keys:
+ for j in SourcePcdDict_Keys:
+ if i != j:
+ IntersectionList = list(set(SourcePcdDict[i]).intersection(set(SourcePcdDict[j])))
+ if len(IntersectionList) > 0:
+ EdkLogger.error(
+ 'build',
+ FORMAT_INVALID,
+ "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),
+ ExtraData="%s" % '\n\t'.join([str(P[1]+'.'+P[0]) for P in IntersectionList])
+ )
+ else:
+ pass
#
# intersection the BinaryPCD for Mixed PCD
|