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 <liming.gao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
This commit is contained in:
Yonghong Zhu 2017-12-12 15:20:18 +08:00
parent 83397f95f9
commit 19bf8314dc
1 changed files with 4 additions and 1 deletions

View File

@ -1845,6 +1845,10 @@ class Build():
if self.ModuleFile.Dir == Module.Dir and self.ModuleFile.Name == Module.Name: if self.ModuleFile.Dir == Module.Dir and self.ModuleFile.Name == Module.Name:
Ma = ModuleAutoGen(Wa, Module, BuildTarget, ToolChain, Arch, self.PlatformFile) Ma = ModuleAutoGen(Wa, Module, BuildTarget, ToolChain, Arch, self.PlatformFile)
if Ma == None: continue 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' # Not to auto-gen for targets 'clean', 'cleanlib', 'cleanall', 'run', 'fds'
if self.Target not in ['clean', 'cleanlib', 'cleanall', 'run', 'fds']: if self.Target not in ['clean', 'cleanlib', 'cleanall', 'run', 'fds']:
# for target which must generate AutoGen code and makefile # for target which must generate AutoGen code and makefile
@ -1856,7 +1860,6 @@ class Build():
del CmdListDict[Module.File, Arch] del CmdListDict[Module.File, Arch]
else: else:
Ma.CreateMakeFile(True) Ma.CreateMakeFile(True)
MaList.append(Ma)
self.BuildModules.append(Ma) self.BuildModules.append(Ma)
self.AutoGenTime += int(round((time.time() - AutoGenStart))) self.AutoGenTime += int(round((time.time() - AutoGenStart)))
MakeStart = time.time() MakeStart = time.time()