[PATCH] D46598: Add support for LTO plugin option obj-path
Peter Collingbourne via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue May 8 14:19:22 PDT 2018
pcc added inline comments.
================
Comment at: lld/ELF/LTO.cpp:283
+ if (Config->LTOObjPath.empty())
saveBuffer(Buff[0], Config->OutputFile + ".lto.o");
+ else
----------------
rdhindsa wrote:
> pcc wrote:
> > I wouldn't save the buffer at all if `obj-path` is not passed.
> Wouldn't we want to store the generated file, if obj-path is not passed? Since we know that Buff[0] is not empty, aren't we supposed to store the content? In that case, is obj-path a requirement for thinlto-index-only?
If you happen to know that all input files do not use full LTO then there is no need to pass `obj-path`. The linker shouldn't write a file to an arbitrary location in that case.
Repository:
rLLD LLVM Linker
https://reviews.llvm.org/D46598
More information about the llvm-commits
mailing list