From 48b0bf6476a215a8e399af3c5905c17f94f2c63d Mon Sep 17 00:00:00 2001 From: "Rodriguez, Christian" Date: Thu, 30 May 2019 00:26:49 +0800 Subject: BaseTools: Refactor hash tracking after checking for Sources section BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=1804 After adding a check to see if [Sources] section lists all the header type files of a module, track module and library hashes for --hash feature. If above check is not in compilance for a library or module, force hash invalidation on that library or module. Signed-off-by: Christian Rodriguez Cc: Bob Feng Cc: Liming Gao Cc: Yonghong Zhu Reviewed-by: Bob Feng --- BaseTools/Source/Python/AutoGen/GenMake.py | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'BaseTools/Source/Python/AutoGen/GenMake.py') diff --git a/BaseTools/Source/Python/AutoGen/GenMake.py b/BaseTools/Source/Python/AutoGen/GenMake.py index 5c992d7c26..212ca0fa7f 100644 --- a/BaseTools/Source/Python/AutoGen/GenMake.py +++ b/BaseTools/Source/Python/AutoGen/GenMake.py @@ -935,10 +935,16 @@ cleanlib: continue 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' EdkLogger.warn("build","Module MetaFile [Sources] is missing local header!", ExtraData = "Local Header: " + aFile + " not found in " + self._AutoGenObject.MetaFile.Path ) -- cgit v1.2.3