|
From: <yi...@us...> - 2011-08-24 01:00:44
|
Revision: 2268
http://edk2-buildtools.svn.sourceforge.net/edk2-buildtools/?rev=2268&view=rev
Author: yingke
Date: 2011-08-24 01:00:38 +0000 (Wed, 24 Aug 2011)
Log Message:
-----------
Report warning if PCD was not specified by any INF module in the platform for the given architecture.
Signed-off-by: yingke
Reviewed-by: lgao4
Reviewed-by: djboyer
Modified Paths:
--------------
trunk/BaseTools/Source/Python/AutoGen/AutoGen.py
Modified: trunk/BaseTools/Source/Python/AutoGen/AutoGen.py
===================================================================
--- trunk/BaseTools/Source/Python/AutoGen/AutoGen.py 2011-08-23 07:59:44 UTC (rev 2267)
+++ trunk/BaseTools/Source/Python/AutoGen/AutoGen.py 2011-08-24 01:00:38 UTC (rev 2268)
@@ -299,6 +299,8 @@
"DynamicEx", # "DynamicExHii", "DynamicExVpd"
]
+ # This dict store PCDs which are not used by any modules with specified arches
+ UnusedPcd = sdict()
for Pa in self.AutoGenObjectList:
# Key of DSC's Pcds dictionary is PcdCName, TokenSpaceGuid
for Pcd in Pa.Platform.Pcds:
@@ -329,15 +331,17 @@
)
return
else:
- EdkLogger.error(
- 'build',
- FORMAT_INVALID,
- "This Pcd is not defined in DEC files: [%s.%s]." \
- % (Pcd[1], Pcd[0]),
- ExtraData=None
- )
- return
+ UnusedPcd.setdefault(Pcd, []).append(Pa.Arch)
+ for Pcd in UnusedPcd:
+ EdkLogger.warn(
+ 'build',
+ "The PCD was not specified by any INF module in the platform for the given architecture.\n"
+ "\tPCD: [%s.%s]\n\tPlatform: [%s]\n\tArch: %s"
+ % (Pcd[1], Pcd[0], os.path.basename(str(self.MetaFile)), str(UnusedPcd[Pcd])),
+ ExtraData=None
+ )
+
def __repr__(self):
return "%s [%s]" % (self.MetaFile, ", ".join(self.ArchList))
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|