|
From: <yi...@us...> - 2012-03-31 08:09:05
|
Revision: 2509
http://edk2-buildtools.svn.sourceforge.net/edk2-buildtools/?rev=2509&view=rev
Author: yingke
Date: 2012-03-31 08:08:58 +0000 (Sat, 31 Mar 2012)
Log Message:
-----------
Check all PCD listed in DSC file, the PCD must be declared by DEC files which are referenced by modules listed in component sections.
Signed-off-by: yingke
Reviewed-by: lgao4
Modified Paths:
--------------
trunk/BaseTools/Source/Python/AutoGen/AutoGen.py
Modified: trunk/BaseTools/Source/Python/AutoGen/AutoGen.py
===================================================================
--- trunk/BaseTools/Source/Python/AutoGen/AutoGen.py 2012-03-29 05:07:34 UTC (rev 2508)
+++ trunk/BaseTools/Source/Python/AutoGen/AutoGen.py 2012-03-31 08:08:58 UTC (rev 2509)
@@ -287,22 +287,23 @@
if self.CapTargetList:
EdkLogger.info("No flash definition file found. Capsule [%s] will be ignored." % " ".join(self.CapTargetList))
self.CapTargetList = []
-
- # apply SKU and inject PCDs from Flash Definition file
- for Arch in self.ArchList:
- Platform = self.BuildDatabase[self.MetaFile, Arch, Target, Toolchain]
- DecPcds = set()
+ # Collect all declared PCD to check if PCDs used in FDF and DSC are declared.
+ AllDeclaredPcd = set()
+ for Arch in self.Platform.SupArchList:
PGen = PlatformAutoGen(self, self.MetaFile, Target, Toolchain, Arch)
Pkgs = PGen.PackageList
for Pkg in Pkgs:
for Pcd in Pkg.Pcds.keys():
- DecPcds.add((Pcd[0], Pcd[1]))
- Platform.IsPlatformPcdDeclared(DecPcds)
+ AllDeclaredPcd.add((Pcd[0], Pcd[1]))
+ # apply SKU and inject PCDs from Flash Definition file
+ for Arch in self.ArchList:
+ Platform = self.BuildDatabase[self.MetaFile, Arch, Target, Toolchain]
+ Platform.IsPlatformPcdDeclared(AllDeclaredPcd)
Platform.SkuName = self.SkuId
for Name, Guid in PcdSet:
- if (Name, Guid) not in DecPcds:
+ if (Name, Guid) not in AllDeclaredPcd:
EdkLogger.error(
'build',
PARSER_ERROR,
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|