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

Joseph Huber via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Apr 18 09:21:39 PDT 2022


jhuber6 added inline comments.


================
Comment at: clang/lib/Driver/Driver.cpp:3885-3888
+  bool UseNewOffloadingDriver =
+      C.isOffloadingHostKind(C.getActiveOffloadKinds()) &&
+      (Args.hasArg(options::OPT_foffload_new_driver) ||
+       Args.hasArg(options::OPT_fopenmp_new_driver));
----------------
yaxunl wrote:
> If OPT_fopenmp_new_driver is on by default, then OPT_foffload_new_driver will have no effect. Is this intended? Should OPT_fopenmp_new_driver be conditioned for OpenMP offloading only?
Yeah, I need to rework the logic here once OpenMP moves to the new driver by default. I can probably require something like.
```
(C.isOffloadingHostKind(Action::OFK_OpenMP) && !Args.hasArg(options::OPT_fno_offload_new_driver) || Args.hasArg(options::OPT_fopenmp_new_driver);
```
Currently working on the patch to make this default for OpenMP so I'll be able to update this after that.


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