[PATCH] D127686: [Offloading] Embed the target features in the OffloadBinary
Joseph Huber via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Jun 13 12:53:53 PDT 2022
jhuber6 created this revision.
jhuber6 added reviewers: jdoerfert, JonChesterfield, tianshilei1992, tra, yaxunl, saiislam.
Herald added a project: All.
jhuber6 requested review of this revision.
Herald added subscribers: cfe-commits, sstefan1, MaskRay.
Herald added a project: clang.
The target features are necessary for correctly compiling most programs
in LTO mode. Currently, these are derived in clang at link time and
passed as an arguemnt to the linker wrapper. This is problematic because
it requires knowing the required toolchain at link time, which should
not be necessry. Instead, these features should be embedded into the
offloading binary so we can unify them in the linker wrapper for LTO.
This also required changing the offload packager to interpret multiple
arguments as concatenation with a comma. This is so we can still use the
`,` separator for the argument list.
Depends on D127246 <https://reviews.llvm.org/D127246>
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D127686
Files:
clang/lib/Driver/ToolChains/Clang.cpp
clang/test/Driver/openmp-offload-gpu-new.c
clang/tools/clang-linker-wrapper/ClangLinkerWrapper.cpp
clang/tools/clang-offload-packager/ClangOffloadPackager.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D127686.436530.patch
Type: text/x-patch
Size: 7824 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20220613/7dc672ae/attachment.bin>
More information about the cfe-commits
mailing list