[PATCH] D116627: [Clang] Initial support for linking offloading code in tool

Joseph Huber via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Jan 4 14:20:53 PST 2022


jhuber6 created this revision.
jhuber6 added reviewers: jdoerfert, gregrodgers, JonChesterfield, ronlieb.
Herald added subscribers: pengfei, tpr.
jhuber6 requested review of this revision.
Herald added subscribers: cfe-commits, sstefan1.
Herald added a project: clang.

This patch adds the initial support for linking NVPTX offloading code
using the clang-linker-wrapper tool. This uses the extracted device
files and runs `nvlink` on them. Currently this is then passed to the
existing toolchain for creating linkable OpenMP offloading programs
using `clang-offload-wrapper` and compiling it manually using `llc`.
More work is required to support LTO, Bitcode linking, AMDGPU, and x86
offloading.

Depends on D116545 <https://reviews.llvm.org/D116545>


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D116627

Files:
  clang/tools/clang-linker-wrapper/ClangLinkerWrapper.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D116627.397404.patch
Type: text/x-patch
Size: 13928 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20220104/68ede56b/attachment-0001.bin>


More information about the cfe-commits mailing list