This is an archive of the discontinued LLVM Phabricator instance.

ELF: Add ThinLTO caching support.
ClosedPublic

Authored by pcc on Mar 1 2017, 2:02 PM.

Details

Summary

This patch adds an option named --thinlto-cache-dir, which specifies the
path to a directory in which to cache native object files for ThinLTO
incremental builds.

Event Timeline

pcc created this revision.Mar 1 2017, 2:02 PM
ruiu edited edge metadata.Mar 1 2017, 2:13 PM

I can make a guess, but can you explain what this is for? (and add that to the code as comments?)

davide accepted this revision.Mar 1 2017, 2:50 PM
davide added a subscriber: davide.

The logic looks good. I'll let Rui review the style.

lld/ELF/LTO.cpp
177–178

explicit type, maybe?

This revision is now accepted and ready to land.Mar 1 2017, 2:50 PM
pcc updated this revision to Diff 90236.Mar 1 2017, 2:53 PM

Add comment explaining the --thinlto-cache-dir option

pcc edited the summary of this revision. (Show Details)Mar 1 2017, 2:54 PM

Done, I've also updated the commit message with an explanation.

pcc marked an inline comment as done.Mar 1 2017, 2:54 PM
ruiu accepted this revision.Mar 1 2017, 3:07 PM

LGTM

This revision was automatically updated to reflect the committed changes.

We should llvm/cmake/modules/HandleLLVMOptions.cmake to add this by default when LLVM_ENABLE_LTO=Thin to match Darwin.

pcc added a comment.Mar 1 2017, 6:47 PM

We should llvm/cmake/modules/HandleLLVMOptions.cmake to add this by default when LLVM_ENABLE_LTO=Thin to match Darwin.

Makes sense, D30522.