tejohnson added inline comments.

================
Comment at: clang/lib/CodeGen/BackendUtil.cpp:1065
+  if (CodeGenOpts.FatLTO) {
+    // Set EnableSplitLTOUnit, since the config above won't
+    if (!TheModule->getModuleFlag("EnableSplitLTOUnit"))
----------------
Can you expand the comment a bit - specifically why it won't end up in the 
above handling? I assume the Action type is different for FatLTO?


================
Comment at: clang/lib/Driver/ToolChains/CommonArgs.cpp:622
     CmdArgs.push_back(Args.MakeArgString(Twine(PluginPrefix) + Plugin));
+  }else{
+    // For LLD we need to enable fat object support
----------------
nit: missing spaces


================
Comment at: clang/lib/Driver/ToolChains/CommonArgs.cpp:625
+    if (Args.hasArg(options::OPT_ffat_lto_objects))
+      CmdArgs.push_back("-fat-lto-objects");
   }
----------------
Needs a test


================
Comment at: clang/test/CodeGen/embed-lto-fatlto.c:2
+// RUN: %clang -cc1 -triple x86_64-unknown-linux-gnu -S -flto=full 
-ffat-lto-objects -emit-llvm < %s  | FileCheck %s
+// RUN: %clang -cc1 -triple x86_64-unknown-linux-gnu -S -flto=full 
-ffat-lto-objects -emit-llvm < %s  | FileCheck %s
+//
----------------
Can you also test -flto=thin, with and without LTO splitting enabled?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D146777

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to