audk/BaseTools/Source/Python/Common
Shi, Steven 2378ea5515 BaseTools:Introduce CopyFileOnChange() function to copy cache files
BZ:https://bugzilla.tianocore.org/show_bug.cgi?id=1894

Basetool need a CopyFileOnChange() function to avoid cache
file writing race in multi-thread build. Some platforms
build fail with file IO writing race issue when the
build cache is enabled to store cache files in multi-threads.
This is because common same library cache files (e.g. some
libs in MdePkg) can be stored by many different driver modules'
build threads at same time. Current build cache need a function
to check whether the same cache file already exist, and only
copy source file if it is different from the destination file.

This patch introduces an atomic copy function to avoid duplicated
cache files copy.

Cc: Liming Gao <liming.gao@intel.com>
Cc: Bob Feng <bob.c.feng@intel.com>
Cc: Christian Rodriguez <christian.rodriguez@intel.com>
Signed-off-by: Steven Shi <steven.shi@intel.com>
Reviewed-by: Bob Feng <bob.c.feng@intel.com>
2019-06-17 17:00:46 +08:00
..
Edk2 BaseTools: Replace BSD License with BSD+Patent License 2019-04-09 09:10:20 -07:00
Uefi BaseTools: Replace BSD License with BSD+Patent License 2019-04-09 09:10:20 -07:00
BuildToolError.py BaseTools: Replace BSD License with BSD+Patent License 2019-04-09 09:10:20 -07:00
BuildVersion.py BaseTools: Replace BSD License with BSD+Patent License 2019-04-09 09:10:20 -07:00
DataType.py BaseTools:Make BaseTools support new rules to generate RAW FFS FILE 2019-06-10 19:48:50 +08:00
EdkLogger.py BaseTools: Replace BSD License with BSD+Patent License 2019-04-09 09:10:20 -07:00
Expression.py BaseTools: Replace BSD License with BSD+Patent License 2019-04-09 09:10:20 -07:00
GlobalData.py BaseTools: Refactor hash tracking after checking for Sources section 2019-06-10 19:48:51 +08:00
LongFilePathOs.py BaseTools:Introduce CopyFileOnChange() function to copy cache files 2019-06-17 17:00:46 +08:00
LongFilePathOsPath.py BaseTools: Replace BSD License with BSD+Patent License 2019-04-09 09:10:20 -07:00
LongFilePathSupport.py BaseTools: Replace BSD License with BSD+Patent License 2019-04-09 09:10:20 -07:00
Misc.py BaseTools:Introduce CopyFileOnChange() function to copy cache files 2019-06-17 17:00:46 +08:00
MultipleWorkspace.py BaseTools: Replace BSD License with BSD+Patent License 2019-04-09 09:10:20 -07:00
Parsing.py BaseTools: Replace BSD License with BSD+Patent License 2019-04-09 09:10:20 -07:00
RangeExpression.py BaseTools: Replace BSD License with BSD+Patent License 2019-04-09 09:10:20 -07:00
StringUtils.py BaseTools: Replace BSD License with BSD+Patent License 2019-04-09 09:10:20 -07:00
TargetTxtClassObject.py BaseTools: Replace BSD License with BSD+Patent License 2019-04-09 09:10:20 -07:00
ToolDefClassObject.py BaseTools: Replace BSD License with BSD+Patent License 2019-04-09 09:10:20 -07:00
VariableAttributes.py BaseTools: Replace BSD License with BSD+Patent License 2019-04-09 09:10:20 -07:00
VpdInfoFile.py BaseTools: Replace BSD License with BSD+Patent License 2019-04-09 09:10:20 -07:00
__init__.py BaseTools: Replace BSD License with BSD+Patent License 2019-04-09 09:10:20 -07:00
caching.py BaseTools: Replace BSD License with BSD+Patent License 2019-04-09 09:10:20 -07:00