summaryrefslogtreecommitdiffstats
path: root/BaseTools/Source/Python/Common/GlobalData.py
diff options
context:
space:
mode:
authorYonghong Zhu <yonghong.zhu@intel.com>2017-09-19 14:31:09 +0800
committerYonghong Zhu <yonghong.zhu@intel.com>2017-09-27 17:14:54 +0800
commit36d083ef0018b78ea12db1a5f2e8df5336541fea (patch)
treeb51b862e4e3bcf590525dbe617666c293f984713 /BaseTools/Source/Python/Common/GlobalData.py
parent3dcb53258df3d3f7deb9ef4083fdb5b7aa9e22b3 (diff)
downloadedk2-36d083ef0018b78ea12db1a5f2e8df5336541fea.tar.gz
edk2-36d083ef0018b78ea12db1a5f2e8df5336541fea.tar.bz2
edk2-36d083ef0018b78ea12db1a5f2e8df5336541fea.zip
BaseTools: add support for BIOS build with binary cache
Add three new options: --hash enables hash-based caching during build process. when --hash is enabled, build tool will base on the module hash value to do the incremental build, without --hash, build tool will base on the timestamp to do the incremental build. --hash option use md5 method to get every hash value, DSC/FDF, tools_def.txt, build_rule.txt and build command are calculated as global hash value, Package DEC and its include header files are calculated as package hash value, Module source files and its INF file are calculated as module hash value. Library hash value will combine the global hash value and its dependent package hash value. Driver hash value will combine the global hash value, its dependent package hash value and its linked library hash value. When --hash and --binary-destination are specified, build tool will copy generated binary files for each module into the directory specified by binary-destination at the build phase. Binary-destination directory caches all generated binary files. When --hash and --binary-source are specified, build tool will try to get the binary files from the binary source directory at the build phase.If the cached binary has the same hash value, it will be directly used. Otherwise, build tool will compile the source files and generate the binary files. Cc: Liming Gao <liming.gao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
Diffstat (limited to 'BaseTools/Source/Python/Common/GlobalData.py')
-rw-r--r--BaseTools/Source/Python/Common/GlobalData.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/BaseTools/Source/Python/Common/GlobalData.py b/BaseTools/Source/Python/Common/GlobalData.py
index 667877e907..45e7ea09b2 100644
--- a/BaseTools/Source/Python/Common/GlobalData.py
+++ b/BaseTools/Source/Python/Common/GlobalData.py
@@ -87,3 +87,10 @@ MixedPcd = {}
# Pcd name for the Pcd which used in the Conditional directives
gConditionalPcds = []
+
+gUseHashCache = None
+gBinCacheDest = None
+gBinCacheSource = None
+gPlatformHash = None
+gPackageHash = {}
+gModuleHash = {}