From dc174cd9e5de5171a5c7729e765b3af8b9e347fd Mon Sep 17 00:00:00 2001 From: Bob Feng Date: Mon, 24 Jun 2019 09:51:24 +0800 Subject: [PATCH] BaseTools: refine CreateAsBuiltInf function 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 Cc: Steven Shi Cc: Christian Rodriguez Signed-off-by: Bob Feng Reviewed-by: Steven Shi Reviewed-by: Jaben Carsey --- 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 @@ -3581,11 +3581,8 @@ class ModuleAutoGen(AutoGen): ## 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 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 @@ -2219,13 +2219,15 @@ class Build(): 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 = [] -- 2.39.2