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>
Reviewed-by: Liming Gao <liming.gao@intel.com>
This commit is contained in:
Yonghong Zhu 2016-10-28 09:09:48 +08:00
parent 18ca2fec97
commit a0c9ce31b6
1 changed files with 2 additions and 0 deletions

View File

@ -825,6 +825,8 @@ class Build():
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()