diff options
author | Yonghong Zhu <yonghong.zhu@intel.com> | 2017-07-25 13:56:53 +0800 |
---|---|---|
committer | Yonghong Zhu <yonghong.zhu@intel.com> | 2017-07-26 10:26:40 +0800 |
commit | 134bbe88ac189799c7f643cd9435a9bd053d8bec (patch) | |
tree | 784eb3f3f171e4a0ed340d9d23e93a7768fea820 /BaseTools/Source/Python/build/build.py | |
parent | 3b341e263da957b2c8896317f41cc32880c878b0 (diff) | |
download | edk2-134bbe88ac189799c7f643cd9435a9bd053d8bec.tar.gz edk2-134bbe88ac189799c7f643cd9435a9bd053d8bec.tar.bz2 edk2-134bbe88ac189799c7f643cd9435a9bd053d8bec.zip |
BaseTools: add some comment for .PrebuildEnv file's usage
This patch add some comments to explain why we use .PrebuildEnv file to
save environment variable settings set by the prebuild script.
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>
Diffstat (limited to 'BaseTools/Source/Python/build/build.py')
-rw-r--r-- | BaseTools/Source/Python/build/build.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/BaseTools/Source/Python/build/build.py b/BaseTools/Source/Python/build/build.py index 1e14fb4dcc..eff1e66b08 100644 --- a/BaseTools/Source/Python/build/build.py +++ b/BaseTools/Source/Python/build/build.py @@ -1029,6 +1029,11 @@ class Build(): if self.Prebuild:
EdkLogger.info("\n- Prebuild Start -\n")
self.LaunchPrebuildFlag = True
+ #
+ # The purpose of .PrebuildEnv file is capture environment variable settings set by the prebuild script
+ # and preserve them for the rest of the main build step, because the child process environment will
+ # evaporate as soon as it exits, we cannot get it in build step.
+ #
PrebuildEnvFile = os.path.join(GlobalData.gConfDirectory,'.cache','.PrebuildEnv')
if os.path.isfile(PrebuildEnvFile):
os.remove(PrebuildEnvFile)
|