]> git.proxmox.com Git - mirror_edk2.git/commit - BaseTools/Source/Python/build/build.py
BaseTools: Improve the file saving and copying reliability
authorShi, Steven <steven.shi@intel.com>
Thu, 15 Aug 2019 14:26:21 +0000 (22:26 +0800)
committerFeng, Bob C <bob.c.feng@intel.com>
Tue, 20 Aug 2019 06:06:07 +0000 (14:06 +0800)
commit94459080c118049aba927ec0444ba5b750b7d2c9
tree0f9590dd9d9abd4315ad3663dbb21b8fe74308b7
parentd01a998612422a70366b3b6b4639d5f54de053a0
BaseTools: Improve the file saving and copying reliability

BZ:https://bugzilla.tianocore.org/show_bug.cgi?id=2079

The Basetool CopyFileOnChange() and SaveFileOnChange()
functions might raise the IOError occasionally when build
in Windows with multi-process and build cache enabled.
The CopyFileOnChange() and SaveFileOnChange() might be invoked
in multiple sub-processes simultaneously, and this patch adds
global locks to sync these functions invoking which can
harden their reliability.

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>
BaseTools/Source/Python/AutoGen/AutoGenWorker.py
BaseTools/Source/Python/AutoGen/CacheIR.py
BaseTools/Source/Python/AutoGen/DataPipe.py
BaseTools/Source/Python/AutoGen/GenC.py [changed mode: 0644->0755]
BaseTools/Source/Python/AutoGen/ModuleAutoGen.py
BaseTools/Source/Python/Common/GlobalData.py
BaseTools/Source/Python/Common/Misc.py [changed mode: 0644->0755]
BaseTools/Source/Python/build/build.py