[all-commits] [llvm/llvm-project] 26eb04: [Clang] Introduce clang-offload-packager tool to b...
Joseph Huber via All-commits
all-commits at lists.llvm.org
Wed May 11 06:39:30 PDT 2022
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 26eb04268f4c9c0e2d4ff5bc53ae90cbb7f6c731
https://github.com/llvm/llvm-project/commit/26eb04268f4c9c0e2d4ff5bc53ae90cbb7f6c731
Author: Joseph Huber <jhuber6 at vols.utk.edu>
Date: 2022-05-11 (Wed, 11 May 2022)
Changed paths:
A clang/docs/ClangOffloadPackager.rst
M clang/include/clang/Basic/CodeGenOptions.h
M clang/include/clang/Driver/Action.h
M clang/include/clang/Driver/ToolChain.h
M clang/lib/CodeGen/BackendUtil.cpp
M clang/lib/Driver/Action.cpp
M clang/lib/Driver/Driver.cpp
M clang/lib/Driver/ToolChain.cpp
M clang/lib/Driver/ToolChains/Clang.cpp
M clang/lib/Driver/ToolChains/Clang.h
M clang/test/Driver/amdgpu-openmp-toolchain-new.c
M clang/test/Driver/cuda-openmp-driver.cu
M clang/test/Driver/cuda-phases.cu
M clang/test/Driver/linker-wrapper-image.c
M clang/test/Driver/linker-wrapper.c
M clang/test/Driver/openmp-offload-gpu-new.c
M clang/test/Driver/openmp-offload-infer.c
M clang/test/Frontend/embed-object.c
M clang/test/Frontend/embed-object.ll
M clang/test/lit.cfg.py
M clang/tools/CMakeLists.txt
A clang/tools/clang-offload-packager/CMakeLists.txt
A clang/tools/clang-offload-packager/ClangOffloadPackager.cpp
Log Message:
-----------
[Clang] Introduce clang-offload-packager tool to bundle device files
In order to do offloading compilation we need to embed files into the
host and create fatbainaries. Clang uses a special binary format to
bundle several files along with their metadata into a single binary
image. This is currently performed using the `-fembed-offload-binary`
option. However this is not very extensibile since it requires changing
the command flag every time we want to add something and makes optional
arguments difficult. This patch introduces a new tool called
`clang-offload-packager` that behaves similarly to CUDA's `fatbinary`.
This tool takes several input files with metadata and embeds it into a
single image that can then be embedded in the host.
Reviewed By: tra
Differential Revision: https://reviews.llvm.org/D125165
More information about the All-commits
mailing list