[PATCH] D123325: [Clang] Make enabling the new driver more generic

Joseph Huber via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Apr 28 11:15:52 PDT 2022


jhuber6 added inline comments.


================
Comment at: clang/include/clang/Driver/Options.td:2535-2538
+def foffload_new_driver : Flag<["-"], "foffload-new-driver">, Flags<[CC1Option]>, Group<Action_Group>,
+  HelpText<"Use the new driver for offloading compilation.">;
+def fno_offload_new_driver : Flag<["-"], "fno-offload-new-driver">, Flags<[CC1Option]>, Group<Action_Group>,
+  HelpText<"Don't Use the new driver for offloading compilation.">;
----------------
tra wrote:
> Nit: Can we combine that into a `BoolFOption` instead of using `Flag` ?
> 
> Also, considering that it's an option which controls the driver's behavior, not just tweaks code generation, perhaps it should be just `--[no]offload-new-driver`.
> 
The `-fopenmp` variant was in LLVM-14 so that should stay at least. I could change it to be `--offload` (Although this does tweak code generation in a later patch to make the offloading entries). I most just used `-f` because all the other OpenMP options use `-f`. I could definitely use `BoolFOption` but I don't think it saves too much in this situation.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D123325



More information about the cfe-commits mailing list