[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
Mon Oct 21 06:16:05 PDT 2019


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:
> 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


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

https://reviews.llvm.org/D69173





More information about the llvm-commits mailing list