[llvm-objcopy] Make .build-id linking atomic
authorJake Ehrlich <jakehehrlich@google.com>
Mon, 18 Mar 2019 20:35:18 +0000 (20:35 +0000)
committerJake Ehrlich <jakehehrlich@google.com>
Mon, 18 Mar 2019 20:35:18 +0000 (20:35 +0000)
commit5049c3422d26b2b68877307c41b35d7e6aae3235
tree9d3e693cb79d03e60288ddf265fad4aa51b5aacf
parentc1d4fc8a62580278198ce0a76ad4783f226bc0af
[llvm-objcopy] Make .build-id linking atomic

This change makes linking into .build-id atomic and safe to use.
Some users under particular workflows are reporting that this races
more than half the time under particular conditions.

llvm-svn: 356404
llvm/include/llvm/Support/FileSystem.h
llvm/lib/Support/Path.cpp
llvm/tools/llvm-objcopy/ELF/ELFObjcopy.cpp