public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [Patch] BaseTools: Fix a bug for tooldef class not include the newly Env
@ 2016-10-28  4:43 Yonghong Zhu
  2016-11-01  1:29 ` Gao, Liming
  0 siblings, 1 reply; 2+ messages in thread
From: Yonghong Zhu @ 2016-10-28  4:43 UTC (permalink / raw)
  To: edk2-devel; +Cc: Liming Gao

Prebuild script may update os.environ, but the tooldef class not include
the new ENV variables. so after the Launch prebuild script, we should
re-init the tooldef class to include the new ENV variables.

Cc: Liming Gao <liming.gao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com>
---
 BaseTools/Source/Python/build/build.py | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/BaseTools/Source/Python/build/build.py b/BaseTools/Source/Python/build/build.py
index f17b55c..35e7037 100644
--- a/BaseTools/Source/Python/build/build.py
+++ b/BaseTools/Source/Python/build/build.py
@@ -823,10 +823,12 @@ class Build():
             EdkLogger.quiet("%-16s = %s" % ("PREBUILD", self.PrebuildScript))
         if self.PostbuildScript:
             EdkLogger.quiet("%-16s = %s" % ("POSTBUILD", self.PostbuildScript))
         if self.PrebuildScript:
             self.LaunchPrebuild()
+            self.TargetTxt = TargetTxtClassObject()
+            self.ToolDef   = ToolDefClassObject()
         if not (self.LaunchPrebuildFlag and os.path.exists(self.PlatformBuildPath)):
             self.InitBuild()
 
         EdkLogger.info("")
         os.chdir(self.WorkspaceDir)
-- 
2.6.1.windows.1



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

* Re: [Patch] BaseTools: Fix a bug for tooldef class not include the newly Env
  2016-10-28  4:43 [Patch] BaseTools: Fix a bug for tooldef class not include the newly Env Yonghong Zhu
@ 2016-11-01  1:29 ` Gao, Liming
  0 siblings, 0 replies; 2+ messages in thread
From: Gao, Liming @ 2016-11-01  1:29 UTC (permalink / raw)
  To: Zhu, Yonghong, edk2-devel@lists.01.org

Reviewed-by: Liming Gao <liming.gao@intel.com>

> -----Original Message-----
> From: Zhu, Yonghong
> Sent: Friday, October 28, 2016 12:43 PM
> To: edk2-devel@lists.01.org
> Cc: Gao, Liming <liming.gao@intel.com>
> Subject: [Patch] BaseTools: Fix a bug for tooldef class not include the newly
> Env
> 
> Prebuild script may update os.environ, but the tooldef class not include
> the new ENV variables. so after the Launch prebuild script, we should
> re-init the tooldef class to include the new ENV variables.
> 
> Cc: Liming Gao <liming.gao@intel.com>
> Contributed-under: TianoCore Contribution Agreement 1.0
> Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com>
> ---
>  BaseTools/Source/Python/build/build.py | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/BaseTools/Source/Python/build/build.py
> b/BaseTools/Source/Python/build/build.py
> index f17b55c..35e7037 100644
> --- a/BaseTools/Source/Python/build/build.py
> +++ b/BaseTools/Source/Python/build/build.py
> @@ -823,10 +823,12 @@ class Build():
>              EdkLogger.quiet("%-16s = %s" % ("PREBUILD", self.PrebuildScript))
>          if self.PostbuildScript:
>              EdkLogger.quiet("%-16s = %s" % ("POSTBUILD", self.PostbuildScript))
>          if self.PrebuildScript:
>              self.LaunchPrebuild()
> +            self.TargetTxt = TargetTxtClassObject()
> +            self.ToolDef   = ToolDefClassObject()
>          if not (self.LaunchPrebuildFlag and
> os.path.exists(self.PlatformBuildPath)):
>              self.InitBuild()
> 
>          EdkLogger.info("")
>          os.chdir(self.WorkspaceDir)
> --
> 2.6.1.windows.1



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

end of thread, other threads:[~2016-11-01  1:29 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-10-28  4:43 [Patch] BaseTools: Fix a bug for tooldef class not include the newly Env Yonghong Zhu
2016-11-01  1:29 ` Gao, Liming

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