Skip to content

Commit

Permalink
BaseTools: refine CreateAsBuiltInf function
Browse files Browse the repository at this point in the history
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>
Reviewed-by: Steven Shi <steven.shi@intel.com>
Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
  • Loading branch information
BobCF committed Jun 25, 2019
1 parent 401507c commit dc174cd
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
5 changes: 1 addition & 4 deletions BaseTools/Source/Python/AutoGen/AutoGen.py
Original file line number Diff line number Diff line change
Expand Up @@ -3581,11 +3581,8 @@ def _GenOffsetBin(self):

## 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
Expand Down
6 changes: 4 additions & 2 deletions BaseTools/Source/Python/build/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -2219,13 +2219,15 @@ def CreateAsBuiltInf(self):
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 = []
Expand Down

0 comments on commit dc174cd

Please sign in to comment.