[PATCH] D69173: [clang][ThinLTO][Legacy] Don't add -fsplit-lto-unit for legacy thin LTO builds

Eugene Leviant via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 22 08:03:19 PDT 2019


evgeny777 marked an inline comment as done.
evgeny777 added inline comments.


================
Comment at: lib/Driver/ToolChains/Clang.cpp:5400
+  // does not support LTO unit splitting.
+  bool SplitLTOUnitSupported = D.getLTOMode() == LTOK_Full ||
+                               !(RawTriple.isOSDarwin() || RawTriple.isPS4());
----------------
steven_wu wrote:
> evgeny777 wrote:
> > steven_wu wrote:
> > > I think this would be cleaner if we add a virtual function `supportSplitLTOUnit` to Toolchain, and let toolchain decide if it is supported, rather than hard code this in Clang.cpp.
> > It doesn't make sense to use virtual function, because there is no toolchain class for PS4. I'd suggest make an ordinary member function checking triple
> PS4CPU.h is not PS4 toolchain? If there is no PS4 toolchain, let's stick with your original patch.
Hm... I somehow didn't realized that PS4CPU is derived from ToolChain. I'll update the patch


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

https://reviews.llvm.org/D69173





More information about the llvm-commits mailing list