From: Yonghong Zhu Date: Fri, 28 Oct 2016 01:09:48 +0000 (+0800) Subject: BaseTools: Fix a bug for tooldef class not include the newly Env X-Git-Tag: edk2-stable201903~5380 X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=commitdiff_plain;h=a0c9ce31b686f1aad449e3572fddbe981fe9e1c7 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 Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yonghong Zhu Reviewed-by: Liming Gao --- diff --git a/BaseTools/Source/Python/build/build.py b/BaseTools/Source/Python/build/build.py index f17b55c4cf..35e70370a5 100644 --- a/BaseTools/Source/Python/build/build.py +++ b/BaseTools/Source/Python/build/build.py @@ -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()