forked from OSchip/llvm-project
0b01dfbba6
Make sure ThinLTO with caching doesn't use non-atomic writes to the cache file (to prevent data races and cache files corruption). 1. Place temp file to the same place where the caching directory is (instead of creating it the directory pointed to by TMP/TEMP variable). This will help to prevent using non-atomic rename and falling back to non-atomic "direct" write to the cache file. 2. if rename failed do not write to the cache file directly (direct write to the file is non-atomic and could cause data race conditions). 3. if cache file doesn't exist (e.g., because 'rename' failed or because some other reasons), bypass using the cache altogether. Differential Revision: https://reviews.llvm.org/D45076 llvm-svn: 328904 |
||
---|---|---|
.. | ||
CMakeLists.txt | ||
Caching.cpp | ||
LLVMBuild.txt | ||
LTO.cpp | ||
LTOBackend.cpp | ||
LTOCodeGenerator.cpp | ||
LTOModule.cpp | ||
ThinLTOCodeGenerator.cpp | ||
UpdateCompilerUsed.cpp |