[PATCH] D126226: [OpenMP] Add `-Xoffload-linker` to forward input to the device linker

Joseph Huber via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon May 23 10:44:51 PDT 2022


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

We use the clang-linker-wrapper to perform device linking of embedded
offloading object files. This is done by generating those jobs inside of
the linker-wrapper itself. This patch adds an argument in Clang and the
linker-wrapper that allows users to forward input to the device linking
phase. This can either be done for every device linker, or for a
specific target triple. We use the `-Xoffload-linker <arg>` and the
`-Xoffload-linker=<triple> <arg>` syntax to accomplish this.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D126226

Files:
  clang/include/clang/Driver/Options.td
  clang/lib/Driver/ToolChains/Clang.cpp
  clang/test/Driver/linker-wrapper.c
  clang/test/Driver/openmp-offload-gpu-new.c
  clang/tools/clang-linker-wrapper/ClangLinkerWrapper.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D126226.431424.patch
Type: text/x-patch
Size: 6235 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20220523/d3ffa10e/attachment.bin>


More information about the cfe-commits mailing list