BaseTools: Change the [Arch][Name] module key in Build cache
BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=1951 Current build cache use the module's [self.Arch][self.Name] info as the ModuleAutoGen object key in hash list and dictionary. The [self.Arch][self.Name] is not safe as the module key because there could be two modules with same module name and arch name in one platform. E.g. A platform can override a module or library instance in another different path, the overriding module can has the same module name and arch name as the original one. Directly use the ModuleAutoGen obj self as the key, because the obj __hash__ and __repr__ attributes already contain the full path and arch name. Cc: Liming Gao <liming.gao@intel.com> Cc: Bob Feng <bob.c.feng@intel.com> Signed-off-by: Steven Shi <steven.shi@intel.com> Reviewed-by: Bob Feng <bob.c.feng@intel.com>
This commit is contained in:
@ -959,16 +959,12 @@ cleanlib:
|
||||
# Keep the file to be checked
|
||||
headerFileDependencySet.add(aFileName)
|
||||
|
||||
# Ensure that gModuleBuildTracking has been initialized per architecture
|
||||
if self._AutoGenObject.Arch not in GlobalData.gModuleBuildTracking:
|
||||
GlobalData.gModuleBuildTracking[self._AutoGenObject.Arch] = dict()
|
||||
|
||||
# Check if a module dependency header file is missing from the module's MetaFile
|
||||
for aFile in headerFileDependencySet:
|
||||
if aFile in headerFilesInMetaFileSet:
|
||||
continue
|
||||
if GlobalData.gUseHashCache:
|
||||
GlobalData.gModuleBuildTracking[self._AutoGenObject.Arch][self._AutoGenObject] = 'FAIL_METAFILE'
|
||||
GlobalData.gModuleBuildTracking[self._AutoGenObject] = 'FAIL_METAFILE'
|
||||
EdkLogger.warn("build","Module MetaFile [Sources] is missing local header!",
|
||||
ExtraData = "Local Header: " + aFile + " not found in " + self._AutoGenObject.MetaFile.Path
|
||||
)
|
||||
|
Reference in New Issue
Block a user