From 19bf8314dc0187e1ccde0ccbd82b876722b8319e Mon Sep 17 00:00:00 2001 From: Yonghong Zhu Date: Tue, 12 Dec 2017 15:20:18 +0800 Subject: [PATCH] BaseTools: enable hash value check for single module build This patch enables hash value check for single module build to decide whether we can skip to build this module. Cc: Liming Gao Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Yonghong Zhu Reviewed-by: Liming Gao --- BaseTools/Source/Python/build/build.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/BaseTools/Source/Python/build/build.py b/BaseTools/Source/Python/build/build.py index 457f6c9ef7..8cf139c77c 100644 --- a/BaseTools/Source/Python/build/build.py +++ b/BaseTools/Source/Python/build/build.py @@ -1845,6 +1845,10 @@ class Build(): if self.ModuleFile.Dir == Module.Dir and self.ModuleFile.Name == Module.Name: Ma = ModuleAutoGen(Wa, Module, BuildTarget, ToolChain, Arch, self.PlatformFile) if Ma == None: continue + MaList.append(Ma) + if Ma.CanSkipbyHash(): + self.HashSkipModules.append(Ma) + continue # Not to auto-gen for targets 'clean', 'cleanlib', 'cleanall', 'run', 'fds' if self.Target not in ['clean', 'cleanlib', 'cleanall', 'run', 'fds']: # for target which must generate AutoGen code and makefile @@ -1856,7 +1860,6 @@ class Build(): del CmdListDict[Module.File, Arch] else: Ma.CreateMakeFile(True) - MaList.append(Ma) self.BuildModules.append(Ma) self.AutoGenTime += int(round((time.time() - AutoGenStart))) MakeStart = time.time()