[PATCH] D31100: [LTO] Allow client to skip code gen

Teresa Johnson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 17 14:11:19 PDT 2017


tejohnson added a comment.

In https://reviews.llvm.org/D31100#704263, @mehdi_amini wrote:

> > We noticed that when invoking the thinBackend via clang (for the distributed build case) that flags like -ffunction-sections and -emit-llvm were not having the intended effect. This could have been fixed by setting up the TargetOptions and the CodeGenFileType in the LTO Config, but since clang already has handling for all of this, it is straightforward to just let it do the handling.
>
> Well, I'm not convinced it is the right thing to do. It is the most straightforward thing to do for the distributed case, but it creates a discrepancy with the non-distributed case, and it won't allow to honor -ffunction-sections this way.


Can you clarify the concern? We do pass down -ffunction-sections correctly in the non-distributed case, e.g. via the gold plugin. The gold plugin which is only handling LTO doesn't have any built in code gen handling (anymore with the new LTO API).

> I also believe that it won't help to guarantee that wether you're using a distributed build or not you get the same binary.

How so?


https://reviews.llvm.org/D31100





More information about the llvm-commits mailing list