]> git.proxmox.com Git - mirror_edk2.git/commit - BaseTools/Source/Python/Common/GlobalData.py
BaseTools: add support for BIOS build with binary cache
authorYonghong Zhu <yonghong.zhu@intel.com>
Tue, 19 Sep 2017 06:31:09 +0000 (14:31 +0800)
committerYonghong Zhu <yonghong.zhu@intel.com>
Wed, 27 Sep 2017 09:14:54 +0000 (17:14 +0800)
commit36d083ef0018b78ea12db1a5f2e8df5336541fea
treeb51b862e4e3bcf590525dbe617666c293f984713
parent3dcb53258df3d3f7deb9ef4083fdb5b7aa9e22b3
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>
BaseTools/Source/Python/AutoGen/AutoGen.py
BaseTools/Source/Python/Common/GlobalData.py
BaseTools/Source/Python/build/build.py