[edk2-devel] [PATCH v2 1/1] BaseTools:Build cache cannot store the cache files for library package

Bob Feng bob.c.feng at intel.com
Mon Jun 17 05:55:52 UTC 2019


Reviewed-by: Bob Feng <bob.c.feng at intel.com>

-----Original Message-----
From: devel at edk2.groups.io [mailto:devel at edk2.groups.io] On Behalf Of Steven Shi
Sent: Tuesday, June 11, 2019 2:33 PM
To: devel at edk2.groups.io
Cc: Gao, Liming <liming.gao at intel.com>; Feng, Bob C <bob.c.feng at intel.com>; Rodriguez, Christian <christian.rodriguez at intel.com>; Fan, ZhijuX <zhijux.fan at intel.com>
Subject: [edk2-devel] [PATCH v2 1/1] BaseTools:Build cache cannot store the cache files for library package

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 at intel.com>
Cc: Bob Feng <bob.c.feng at intel.com>
Cc: Zhiju.Fan <zhijux.fan at intel.com>
Signed-off-by: Steven Shi <steven.shi at intel.com>
---
 BaseTools/Source/Python/AutoGen/AutoGen.py | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/BaseTools/Source/Python/AutoGen/AutoGen.py b/BaseTools/Source/Python/AutoGen/AutoGen.py
index 3f41fbb507..f59a8038d5 100644
--- a/BaseTools/Source/Python/AutoGen/AutoGen.py
+++ b/BaseTools/Source/Python/AutoGen/AutoGen.py
@@ -3569,8 +3569,11 @@ class ModuleAutoGen(AutoGen):
         if self.IsAsBuiltInfCreated:
             return
 
-        # Skip the following code for libraries
+        # Skip INF file generation for libraries
         if self.IsLibrary:
+            # Only store the library cache if needed
+            if GlobalData.gBinCacheDest:
+                self.CopyModuleToCache()
             return
 
         # Skip the following code for modules with no source files
--
2.17.1.windows.2





-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#42487): https://edk2.groups.io/g/devel/message/42487
Mute This Topic: https://groups.io/mt/32013383/1813853
Group Owner: devel+owner at edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [edk2-devel-archive at redhat.com]
-=-=-=-=-=-=-=-=-=-=-=-





More information about the edk2-devel-archive mailing list