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

Steven Wu via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 18 09:52:53 PDT 2019


steven_wu added a comment.

A small suggestion for improvement.



================
Comment at: lib/Driver/ToolChains/Clang.cpp:5400
+  // does not support LTO unit splitting.
+  bool SplitLTOUnitSupported = D.getLTOMode() == LTOK_Full ||
+                               !(RawTriple.isOSDarwin() || RawTriple.isPS4());
----------------
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.


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

https://reviews.llvm.org/D69173





More information about the llvm-commits mailing list