This is an archive of the discontinued LLVM Phabricator instance.

Allow bundle size to be 0 in clang-offload-bundler
ClosedPublic

Authored by yaxunl on Feb 11 2019, 8:51 AM.

Details

Summary

HIP uses clang-offload-bundler to create fat binary. The bundle for host is empty.
Currently clang-offload-bundler checks if the bundle size is 0 when unbundling.
If so it will exit without unbundling the remaining bundles. This causes
clang-offload-bundler not being able to unbundle fat binaries generated for HIP.

This patch allows bundles size to be 0 when clang-offload-bundler unbundles
input files.

Diff Detail

Repository
rC Clang

Event Timeline

yaxunl created this revision.Feb 11 2019, 8:51 AM

I really don't understand this well enough to review.

Alexey, could you please also review this patch? Thanks.

This revision is now accepted and ready to land.Mar 5 2019, 7:24 AM
This revision was automatically updated to reflect the committed changes.
Herald added a project: Restricted Project. · View Herald TranscriptMar 5 2019, 9:52 AM