]> git.proxmox.com Git - mirror_edk2.git/commitdiff
BaseTools:Build Cache output notification message
authorShi, Steven <steven.shi@intel.com>
Fri, 14 Jun 2019 11:44:41 +0000 (19:44 +0800)
committerFeng, Bob C <bob.c.feng@intel.com>
Mon, 17 Jun 2019 09:00:45 +0000 (17:00 +0800)
BZ:https://bugzilla.tianocore.org/show_bug.cgi?id=1868

Build need output the cache miss or hit notification
message when consume the build cache. Current build does not
output any message which is not clear for user to know
whether the module built result is from cache or not.

This patch adds message about the cache miss or hit when
build consumes the cache.

Cc: Liming Gao <liming.gao@intel.com>
Cc: Bob Feng <bob.c.feng@intel.com>
Cc: Zhiju.Fan <zhijux.fan@intel.com>
Signed-off-by: Steven Shi <steven.shi@intel.com>
Reviewed-by: Bob Feng <bob.c.feng@intel.com>
BaseTools/Source/Python/build/build.py

index 0855d4561cf8ca6a1b19345f2d380a0c49e8d3c1..2dca3c7b34201e35abbf7982e704eda990dd94f6 100644 (file)
@@ -1815,7 +1815,12 @@ class Build():
                             MaList.append(Ma)\r
                             if Ma.CanSkipbyHash():\r
                                 self.HashSkipModules.append(Ma)\r
+                                if GlobalData.gBinCacheSource:\r
+                                    EdkLogger.quiet("cache hit: %s[%s]" % (Ma.MetaFile.Path, Ma.Arch))\r
                                 continue\r
+                            else:\r
+                                if GlobalData.gBinCacheSource:\r
+                                    EdkLogger.quiet("cache miss: %s[%s]" % (Ma.MetaFile.Path, Ma.Arch))\r
                             # Not to auto-gen for targets 'clean', 'cleanlib', 'cleanall', 'run', 'fds'\r
                             if self.Target not in ['clean', 'cleanlib', 'cleanall', 'run', 'fds']:\r
                                 # for target which must generate AutoGen code and makefile\r
@@ -2004,7 +2009,12 @@ class Build():
                             continue\r
                         if Ma.CanSkipbyHash():\r
                             self.HashSkipModules.append(Ma)\r
+                            if GlobalData.gBinCacheSource:\r
+                                EdkLogger.quiet("cache hit: %s[%s]" % (Ma.MetaFile.Path, Ma.Arch))\r
                             continue\r
+                        else:\r
+                            if GlobalData.gBinCacheSource:\r
+                                EdkLogger.quiet("cache miss: %s[%s]" % (Ma.MetaFile.Path, Ma.Arch))\r
 \r
                         # Not to auto-gen for targets 'clean', 'cleanlib', 'cleanall', 'run', 'fds'\r
                         if self.Target not in ['clean', 'cleanlib', 'cleanall', 'run', 'fds']:\r