]> git.proxmox.com Git - mirror_edk2.git/commitdiff
BaseTools:Extend the binary cache to support library cache
authorSteven Shi <steven.shi@intel.com>
Thu, 30 May 2019 02:31:27 +0000 (10:31 +0800)
committerFeng, Bob C <bob.c.feng@intel.com>
Fri, 31 May 2019 11:46:16 +0000 (19:46 +0800)
https://bugzilla.tianocore.org/show_bug.cgi?id=1797

Current binary cache doesn't support to save and restore
the library module. If a driver module cache miss happen,
all its dependency library modules need rebuild which
is very time-consuming. This patch is to extend the binary
cache to support library.

Cc: Liming Gao <liming.gao@intel.com>
Cc: Bob Feng <bob.c.feng@intel.com>
Cc: Christian Rodriguez <christian.rodriguez@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 a5bef4f7c62a0ec3ab7346460bce44c61cc93349..7b35f837f57cb1d1c470688b76853d0a76e4c4d6 100644 (file)
@@ -3906,6 +3906,12 @@ class ModuleAutoGen(AutoGen):
             ModuleFile = path.join(self.OutputDir, self.Name + '.inf')\r
             if os.path.exists(ModuleFile):\r
                 shutil.copy2(ModuleFile, FileDir)\r
+        else:\r
+            OutputDir = self.OutputDir.replace('\\', '/').strip('/')\r
+            DebugDir = self.DebugDir.replace('\\', '/').strip('/')\r
+            for Item in self.CodaTargetList:\r
+                File = Item.Target.Path.replace('\\', '/').strip('/').replace(DebugDir, '').replace(OutputDir, '').strip('/')\r
+                self.OutputFile.add(File)\r
         if not self.OutputFile:\r
             Ma = self.BuildDatabase[self.MetaFile, self.Arch, self.BuildTarget, self.ToolChain]\r
             self.OutputFile = Ma.Binaries\r