From: Bob Feng Date: Mon, 24 Jun 2019 01:51:24 +0000 (+0800) Subject: BaseTools: refine CreateAsBuiltInf function X-Git-Tag: edk2-stable201908~358 X-Git-Url: https://git.proxmox.com/?a=commitdiff_plain;h=dc174cd9e5de5171a5c7729e765b3af8b9e347fd;hp=401507c786b4b8bc208c0c34ebdad047173e37ea;p=mirror_edk2.git 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 --- 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 = []