summaryrefslogtreecommitdiffstats
path: root/BaseTools/Source/Python/Common
diff options
context:
space:
mode:
authorShi, Steven <steven.shi@intel.com>2019-08-15 22:26:17 +0800
committerFeng, Bob C <bob.c.feng@intel.com>2019-08-20 14:06:05 +0800
commit0e7e7a264cd80ab71ea0f9e9da2d0617d4b539c4 (patch)
treed50807986105cd221b951fada78a740f5a3ebc06 /BaseTools/Source/Python/Common
parent811328172841ce3f7ec1fe7033c130726ad189b7 (diff)
downloadedk2-0e7e7a264cd80ab71ea0f9e9da2d0617d4b539c4.tar.gz
edk2-0e7e7a264cd80ab71ea0f9e9da2d0617d4b539c4.tar.bz2
edk2-0e7e7a264cd80ab71ea0f9e9da2d0617d4b539c4.zip
BaseTools: Improve the cache hit in the edk2 build cache
BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=1927 Current cache hash algorithm does not parse and generate the makefile to get the accurate dependency files for a module. It instead use the platform and package meta files to get the module depenedency in a quick but over approximate way. These meta files are monolithic and involve many redundant dependency for the module, which cause the module build cache miss easily. This patch introduces one more cache checkpoint and a new hash algorithm besides the current quick one. The new hash algorithm leverages the module makefile to achieve more accurate and precise dependency info for a module. When the build cache miss with the first quick hash, the Basetool will caculate new one after makefile is generated and then check again. Cc: Liming Gao <liming.gao@intel.com> Cc: Bob Feng <bob.c.feng@intel.com> Signed-off-by: Steven Shi <steven.shi@intel.com> Reviewed-by: Bob Feng <bob.c.feng@intel.com>
Diffstat (limited to 'BaseTools/Source/Python/Common')
-rwxr-xr-x[-rw-r--r--]BaseTools/Source/Python/Common/GlobalData.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/BaseTools/Source/Python/Common/GlobalData.py b/BaseTools/Source/Python/Common/GlobalData.py
index bd45a43728..9ea835314a 100644..100755
--- a/BaseTools/Source/Python/Common/GlobalData.py
+++ b/BaseTools/Source/Python/Common/GlobalData.py
@@ -119,3 +119,12 @@ gModuleBuildTracking = dict()
# Top Dict: Key: Arch Type Value: Dictionary
# Second Dict: Key: Module\Library Name Value: True\False
gBuildHashSkipTracking = dict()
+
+# Common dictionary to share module cache intermediate result and state
+gCacheIR = None
+# Common lock for the file access in multiple process AutoGens
+file_lock = None
+# Common dictionary to share platform libraries' constant Pcd
+libConstPcd = None
+# Common dictionary to share platform libraries' reference info
+Refes = None \ No newline at end of file