[PATCH] D127515: [Clang] Change host/device only compilation to a driver mode

Joseph Huber via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Jun 10 11:14:26 PDT 2022


jhuber6 created this revision.
jhuber6 added reviewers: tra, jdoerfert, JonChesterfield, yaxunl.
Herald added a project: All.
jhuber6 requested review of this revision.
Herald added subscribers: cfe-commits, MaskRay.
Herald added a project: clang.

We use the flags `--offload-host-only` and `--offload-device-only` to
change the driver's code generation for offloading programs. These are
currently parsed out independently in many places. This patch simply
refactors this to work as a mode for the Driver. This stopped us from
emitting warnings if unused because it's always used now, but I don't
think this is a great loss.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D127515

Files:
  clang/include/clang/Driver/Driver.h
  clang/lib/Driver/Driver.cpp
  clang/test/Driver/cuda-unused-arg-warning.cu

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D127515.435982.patch
Type: text/x-patch
Size: 7378 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20220610/af40dc21/attachment-0001.bin>


More information about the cfe-commits mailing list