public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [Patch 1/2] BaseTools: refine CreateAsBuiltInf function
@ 2019-06-24  1:51 Bob Feng
  2019-06-24  7:19 ` Steven Shi
  0 siblings, 1 reply; 2+ messages in thread
From: Bob Feng @ 2019-06-24  1:51 UTC (permalink / raw)
  To: devel; +Cc: Liming Gao, Steven Shi, Christian Rodriguez, Bob Feng

BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=1932
ModuleAutogen.CreateAsBuiltInf IsOnlyCopy parameter
and related function can be moved out of CreateAsBuiltInf,
so that CreateAsBuiltInf is more clean.

Cc: Liming Gao <liming.gao@intel.com>
Cc: Steven Shi <steven.shi@intel.com>
Cc: Christian Rodriguez <christian.rodriguez@intel.com>
Signed-off-by: Bob Feng <bob.c.feng@intel.com>
---
 BaseTools/Source/Python/AutoGen/AutoGen.py | 5 +----
 BaseTools/Source/Python/build/build.py     | 6 ++++--
 2 files changed, 5 insertions(+), 6 deletions(-)

diff --git a/BaseTools/Source/Python/AutoGen/AutoGen.py b/BaseTools/Source/Python/AutoGen/AutoGen.py
index f50941d422..45b81ed660 100644
--- a/BaseTools/Source/Python/AutoGen/AutoGen.py
+++ b/BaseTools/Source/Python/AutoGen/AutoGen.py
@@ -3579,15 +3579,12 @@ class ModuleAutoGen(AutoGen):
         fInputfile.close ()
         return OutputName
 
     ## Create AsBuilt INF file the module
     #
-    def CreateAsBuiltInf(self, IsOnlyCopy = False):
+    def CreateAsBuiltInf(self):
         self.OutputFile = set()
-        if IsOnlyCopy and GlobalData.gBinCacheDest:
-            self.CopyModuleToCache()
-            return
 
         if self.IsAsBuiltInfCreated:
             return
 
         # Skip INF file generation for libraries
diff --git a/BaseTools/Source/Python/build/build.py b/BaseTools/Source/Python/build/build.py
index 2dca3c7b34..3ece4d4c61 100644
--- a/BaseTools/Source/Python/build/build.py
+++ b/BaseTools/Source/Python/build/build.py
@@ -2217,17 +2217,19 @@ class Build():
         all_mod_set = set()
         for Module in self.BuildModules:
             Module.CreateAsBuiltInf()
             all_mod_set.add(Module)
         for Module in self.HashSkipModules:
-            Module.CreateAsBuiltInf(True)
+            if  GlobalData.gBinCacheDest:
+                Module.CopyModuleToCache()
             all_mod_set.add(Module)
         for Module in all_mod_set:
             for lib in Module.LibraryAutoGenList:
                 all_lib_set.add(lib)
         for lib in all_lib_set:
-            lib.CreateAsBuiltInf(True)
+            if  GlobalData.gBinCacheDest:
+                lib.CopyModuleToCache()
         all_lib_set.clear()
         all_mod_set.clear()
         self.BuildModules = []
         self.HashSkipModules = []
     ## Do some clean-up works when error occurred
-- 
2.20.1.windows.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-06-24  7:19 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-06-24  1:51 [Patch 1/2] BaseTools: refine CreateAsBuiltInf function Bob Feng
2019-06-24  7:19 ` Steven Shi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox