[ThinLTO] Add an API to trigger file-based API for returning objects to the linker
authorMehdi Amini <mehdi.amini@apple.com>
Wed, 14 Dec 2016 04:56:42 +0000 (04:56 +0000)
committerMehdi Amini <mehdi.amini@apple.com>
Wed, 14 Dec 2016 04:56:42 +0000 (04:56 +0000)
commit8e13bc4562c2b921b0bd4e46a1c119f6ddfba07e
treee7e7d67361279bfebc522363479b781ccfb5c632
parent378b8c8f012bacb85a4057e29a4e6b522842e94d
[ThinLTO] Add an API to trigger file-based API for returning objects to the linker

Summary:
The motivation is to support better the -object_path_lto option on
Darwin. The linker needs to write down the generate object files on
disk for later use by lldb or dsymutil (debug info are not present
in the final binary). We're moving this into libLTO so that we can
be smarter when a cache is enabled and hard-link when possible
instead of duplicating the files.

Reviewers: tejohnson, deadalnix, pcc

Subscribers: dexonsmith, llvm-commits

Differential Revision: https://reviews.llvm.org/D27507

llvm-svn: 289631
llvm/include/llvm-c/lto.h
llvm/include/llvm/LTO/legacy/ThinLTOCodeGenerator.h
llvm/include/llvm/Support/FileSystem.h
llvm/lib/LTO/ThinLTOCodeGenerator.cpp
llvm/lib/Support/Unix/Path.inc
llvm/lib/Support/Windows/Path.inc
llvm/test/ThinLTO/X86/save_objects.ll [new file with mode: 0644]
llvm/tools/llvm-lto/llvm-lto.cpp
llvm/tools/lto/lto.cpp
llvm/tools/lto/lto.exports