[PATCH] D53890: [LTO] Record whether LTOUnit splitting is enabled in index

Duncan P. N. Exon Smith via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 19 06:23:49 PST 2018


dexonsmith added a comment.

In D53890#1335770 <https://reviews.llvm.org/D53890#1335770>, @pcc wrote:

> This means that
>
>   clang -c -flto=thin foo.c
>   [upgrade clang]
>   clang -c -flto=thin bar.c
>   clang foo.o bar.o
>
>
> will fail unless you add `-fsplit-lto-unit` to the second invocation. Given that the alternative is that we potentially silently miscompile, maybe that's fine. It would be possible to handle this case without aborting or miscompiling by splitting `bar.o` inside the linker and treating it as if it had always been split, but given that there's a workaround maybe that's not that critical.


I would have expected this to link successfully, but disable any optimizations that we don’t have enough information to perform safely.


Repository:
  rL LLVM

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D53890/new/

https://reviews.llvm.org/D53890





More information about the llvm-commits mailing list