]> git.proxmox.com Git - mirror_edk2.git/commitdiff
BaseTools:Build cache cannot store the cache files for library package
authorShi, Steven <steven.shi@intel.com>
Tue, 11 Jun 2019 06:33:16 +0000 (14:33 +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=1867

Current build cache cannot store the cache for library package.
build -p MdePkg\MdePkg.dsc -a IA32 -b DEBUG -t VS2015x86 --hash
--binary-destination=BinCache
After build, the expected result is the BinCache folder is generated
and the MdePkg build cache files (e.g. .hash and .lib) are stored in
the BinCache folder. But the BinCache folder is not generated at all.

This patch is going to fix that issue.

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/AutoGen/AutoGen.py

index 3f41fbb507aabd88c3ae918661fce188e10ce533..f59a8038d5a7cf7a5ffa82e2cb6ec235559f7ddf 100644 (file)
@@ -3569,8 +3569,11 @@ class ModuleAutoGen(AutoGen):
         if self.IsAsBuiltInfCreated:\r
             return\r
 \r
-        # Skip the following code for libraries\r
+        # Skip INF file generation for libraries\r
         if self.IsLibrary:\r
+            # Only store the library cache if needed\r
+            if GlobalData.gBinCacheDest:\r
+                self.CopyModuleToCache()\r
             return\r
 \r
         # Skip the following code for modules with no source files\r