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