[PATCH] D138221: [HIP] Fix lld failure when devie object is empty

2022-11-22 Thread Yaxun Liu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG056ebadf5c75: [HIP] Fix lld failure when devie object is empty (authored by yaxunl). Herald added a project: clang. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.

[PATCH] D138221: [HIP] Fix lld failure when devie object is empty

2022-11-21 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl marked an inline comment as done. yaxunl added a comment. In D138221#3942095 , @MaskRay wrote: > In D138221#3941173 , @yaxunl wrote: > >> In D138221#3939384 , @Mask

[PATCH] D138221: [HIP] Fix lld failure when devie object is empty

2022-11-21 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. In D138221#3941173 , @yaxunl wrote: > In D138221#3939384 , @MaskRay wrote: > >>> Some host relocatable objects may not contain device relocatable objects, >>> where an empty file is passe

[PATCH] D138221: [HIP] Fix lld failure when devie object is empty

2022-11-21 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay accepted this revision. MaskRay added a comment. This revision is now accepted and ready to land. LGTM. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D138221/new/ https://reviews.llvm.org/D138221 ___ cfe-commits mailing list cfe-commit

[PATCH] D138221: [HIP] Fix lld failure when devie object is empty

2022-11-21 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl marked an inline comment as done. yaxunl added a comment. In D138221#3939384 , @MaskRay wrote: >> Some host relocatable objects may not contain device relocatable objects, >> where an empty file is passed to lld, which causes lld to fail. > > How

[PATCH] D138221: [HIP] Fix lld failure when devie object is empty

2022-11-21 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl updated this revision to Diff 476892. yaxunl added a comment. Herald added subscribers: kerbowa, jvesely. add test emulation-amdgpu.s CHANGES SINCE LAST ACTION https://reviews.llvm.org/D138221/new/ https://reviews.llvm.org/D138221 Files: clang/lib/Driver/ToolChains/HIPAMD.cpp clan

[PATCH] D138221: [HIP] Fix lld failure when devie object is empty

2022-11-19 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. > Some host relocatable objects may not contain device relocatable objects, > where an empty file is passed to lld, which causes lld to fail. How is an empty file (size=0) passed to lld? If a dummy relocatable object file is parsed to lld, lld can infer the machine type

[PATCH] D138221: [HIP] Fix lld failure when devie object is empty

2022-11-19 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay requested changes to this revision. MaskRay added inline comments. This revision now requires changes to proceed. Comment at: lld/ELF/Driver.cpp:179 .Case("msp430elf", {ELF32LEKind, EM_MSP430}) + .Case("elf64_amdgpu", {ELF64LEKind, EM_AMDGPU})

[PATCH] D138221: [HIP] Fix lld failure when devie object is empty

2022-11-18 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl updated this revision to Diff 476454. yaxunl added a comment. need to specify osabi for elf64_amdgpu CHANGES SINCE LAST ACTION https://reviews.llvm.org/D138221/new/ https://reviews.llvm.org/D138221 Files: clang/lib/Driver/ToolChains/HIPAMD.cpp clang/test/Driver/hip-toolchain-devic

[PATCH] D138221: [HIP] Fix lld failure when devie object is empty

2022-11-17 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl updated this revision to Diff 476157. yaxunl added a comment. fix typo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D138221/new/ https://reviews.llvm.org/D138221 Files: clang/lib/Driver/ToolChains/HIPAMD.cpp clang/test/Driver/hip-toolchain-device-only.hip clang/test/Driver

[PATCH] D138221: [HIP] Fix lld failure when devie object is empty

2022-11-17 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl created this revision. yaxunl added reviewers: tra, MaskRay. Herald added subscribers: kosarev, StephenFan, arichardson, tpr, emaste. Herald added a project: All. yaxunl requested review of this revision. When -fgpu-rdc is used for linking relocatable objects, device relocatable objects ar