[edk2-devel] [Patch 1/2] BaseTools: refine CreateAsBuiltInf function

Steven Shi steven.shi at intel.com
Mon Jun 24 07:19:07 UTC 2019


Reviewed-by: Steven Shi <steven.shi at intel.com>

> -----Original Message-----
> From: Feng, Bob C
> Sent: Monday, June 24, 2019 9:51 AM
> To: devel at edk2.groups.io
> Cc: Gao, Liming <liming.gao at intel.com>; Shi, Steven <steven.shi at intel.com>;
> Rodriguez, Christian <christian.rodriguez at intel.com>; Feng, Bob C
> <bob.c.feng at intel.com>
> Subject: [Patch 1/2] 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 <liming.gao at intel.com>
> Cc: Steven Shi <steven.shi at intel.com>
> Cc: Christian Rodriguez <christian.rodriguez at intel.com>
> Signed-off-by: Bob Feng <bob.c.feng at 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


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

View/Reply Online (#42734): https://edk2.groups.io/g/devel/message/42734
Mute This Topic: https://groups.io/mt/32187982/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