[PATCH] D99683: [HIP] Support ThinLTO

Jan Svoboda via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Apr 6 01:31:25 PDT 2021


jansvoboda11 added inline comments.


================
Comment at: clang/include/clang/Driver/Options.td:1904-1907
+def foffload_lto : Flag<["-"], "foffload-lto">, Flags<[CoreOption]>, Group<f_Group>,
+  HelpText<"Enable LTO in 'full' mode for offload compilation">;
+def fno_offload_lto : Flag<["-"], "fno-offload-lto">, Flags<[CoreOption]>, Group<f_Group>,
+  HelpText<"Disable LTO mode (default) for offload compilation">;
----------------
yaxunl wrote:
> tra wrote:
> > Should it be `BoolFOption` ? 
> Yes. will fix
The `BoolFOption` marshalling multiclass should be only used for flags where either the positive or the negative (or both) are -cc1 options and map to a field in `CompilerInvocation`.

Since this patch only deals with the driver (not the cc1 frontend) using `BoolFOption` is not correct. Please, revert this change to the previous state.

I might need to explicitly call this out in the documentation https://clang.llvm.org/docs/InternalsManual.html#adding-new-command-line-option.


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

https://reviews.llvm.org/D99683



More information about the cfe-commits mailing list