To support linking device code in different source files, it is necessary to
embed fat binary at host linking stage.
This patch emits an external symbol for fat binary in host codegen, then
embed the fat binary by lld through a linker script.
Paths
| Differential D46472
[HIP] Support offloading by linker script ClosedPublic Authored by yaxunl on May 4 2018, 2:09 PM.
Details Summary To support linking device code in different source files, it is necessary to This patch emits an external symbol for fat binary in host codegen, then
Diff Detail
Event TimelineComment Actions The IRGen aspects of this seem reasonable, modulo a comment change. I don't feel qualified to judge the driver change.
yaxunl retitled this revision from [HIP] Support offloading by linkscript to [HIP] Support offloading by linker script.May 15 2018, 9:12 AM Comment Actions LGTM except for minor suggestions.
This revision is now accepted and ready to land.May 17 2018, 1:17 PM Comment Actions
Thanks. Will make changes when committing. Closed by commit rL332724: [HIP] Support offloading by linker script (authored by yaxunl). · Explain WhyMay 18 2018, 8:11 AM This revision was automatically updated to reflect the committed changes.
JonChesterfield added inline comments.
Revision Contents
Diff 147511 cfe/trunk/include/clang/Driver/Options.td
cfe/trunk/lib/CodeGen/CGCUDANV.cpp
cfe/trunk/lib/Driver/ToolChains/CommonArgs.h
cfe/trunk/lib/Driver/ToolChains/CommonArgs.cpp
cfe/trunk/lib/Driver/ToolChains/Gnu.cpp
cfe/trunk/test/CodeGenCUDA/device-stub.cu
|
Should this be toolchains::HipToolChain?