X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=blobdiff_plain;f=BaseTools%2FSource%2FPython%2Fbuild%2Fbuild.py;h=80ceb983104f6ecfa660942fd4a0a904e797f60d;hp=71478b7268e364640ad43d3d8972c8540433ca7c;hb=e812a812c1a0800c49e11507cb46222351520cc7;hpb=0eccea3fbe2f6d4999d972d9310d4f2717f5100c diff --git a/BaseTools/Source/Python/build/build.py b/BaseTools/Source/Python/build/build.py index 71478b7268..80ceb98310 100644 --- a/BaseTools/Source/Python/build/build.py +++ b/BaseTools/Source/Python/build/build.py @@ -593,7 +593,7 @@ class BuildTask: # def AddDependency(self, Dependency): for Dep in Dependency: - if not Dep.BuildObject.IsBinaryModule: + if not Dep.BuildObject.IsBinaryModule and not Dep.BuildObject.CanSkipbyHash(): self.DependencyList.append(BuildTask.New(Dep)) # BuildTask list ## The thread wrapper of LaunchCommand function @@ -605,6 +605,11 @@ class BuildTask: try: self.BuildItem.BuildObject.BuildTime = LaunchCommand(Command, WorkingDir) self.CompleteFlag = True + + # Run hash operation post dependency, to account for libs + if GlobalData.gUseHashCache and self.BuildItem.BuildObject.IsLibrary: + HashFile = path.join(self.BuildItem.BuildObject.BuildDir, self.BuildItem.BuildObject.Name + ".hash") + SaveFileOnChange(HashFile, self.BuildItem.BuildObject.GenModuleHash(), True) except: # # TRICK: hide the output of threads left running, so that the user can @@ -1165,8 +1170,8 @@ class Build(): os.remove(ModuleHashFile) # Remove .hash file from cache - if GlobalData.gBinCacheSource: - FileDir = path.join(GlobalData.gBinCacheSource, moduleAutoGenObj.Arch, moduleAutoGenObj.SourceDir, moduleAutoGenObj.MetaFile.BaseName) + if GlobalData.gBinCacheDest: + FileDir = path.join(GlobalData.gBinCacheDest, moduleAutoGenObj.Arch, moduleAutoGenObj.SourceDir, moduleAutoGenObj.MetaFile.BaseName) HashFile = path.join(FileDir, moduleAutoGenObj.Name + '.hash') if os.path.exists(HashFile): os.remove(HashFile) @@ -1227,10 +1232,6 @@ class Build(): # run if Target == 'run': - RunDir = os.path.normpath(os.path.join(AutoGenObject.BuildDir, GlobalData.gGlobalDefines['ARCH'])) - Command = '.\SecMain' - os.chdir(RunDir) - LaunchCommand(Command, RunDir) return True # build modules @@ -1359,10 +1360,6 @@ class Build(): # run if Target == 'run': - RunDir = os.path.normpath(os.path.join(AutoGenObject.BuildDir, GlobalData.gGlobalDefines['ARCH'])) - Command = '.\SecMain' - os.chdir(RunDir) - LaunchCommand(Command, RunDir) return True # build library @@ -2480,7 +2477,7 @@ def Main(): "\nbuild", CODE_ERROR, "Unknown fatal error when processing [%s]" % MetaFile, - ExtraData="\n(Please send email to edk2-devel@lists.01.org for help, attaching following call stack trace!)\n", + ExtraData="\n(Please send email to %s for help, attaching following call stack trace!)\n" % MSG_EDKII_MAIL_ADDR, RaiseError=False ) EdkLogger.quiet("(Python %s on %s) " % (platform.python_version(), sys.platform) + traceback.format_exc())