mirror of
https://github.com/RPCSX/llvm.git
synced 2025-02-27 16:38:30 +00:00

After the call to sys::fs::exists succeeds, indicating a cache hit, we call AddFile and the client will open the file using the supplied path. If the client is using cache pruning, there is a potential race between the pruner and the client. To avoid this, change the caching API so that it provides a MemoryBuffer to the client, and have clients use that MemoryBuffer where possible. This scheme won't work with the gold plugin because the plugin API expects a file path. So we have the gold plugin use the buffer identifier as a path and live with the race for now. (Note that the gold plugin isn't actually affected by the problem at the moment because it doesn't support cache pruning.) This effectively reverts r279883 modulo the change to use the existing path in the gold plugin. Differential Revision: https://reviews.llvm.org/D31063 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@298020 91177308-0d34-0410-b5e6-96231b3b80d8
The LLVM Gold LTO Plugin ======================== This directory contains a plugin that is designed to work with binutils gold linker. At present time, this is not the default linker in binutils, and the default build of gold does not support plugins. See docs/GoldPlugin.html for complete build and usage instructions. NOTE: libLTO and LLVMgold aren't built without PIC because they would fail to link on x86-64 with a relocation error: PIC and non-PIC can't be combined. As an alternative to passing --enable-pic, you can use 'make ENABLE_PIC=1' in your entire LLVM build.