echristo added inline comments.
================ Comment at: clang/lib/Driver/ToolChains/HIPUtility.cpp:119-133 + // Add MC directives to embed target binaries. We ensure that each + // section and image is 16-byte aligned. This is not mandatory, but + // increases the likelihood of data to be aligned with a cache block + // in several main host machines. + ObjStream << "# HIP Object Generator\n"; + ObjStream << "# *** Automatically generated by Clang ***\n"; + ObjStream << " .protected __hip_fatbin\n"; ---------------- tra wrote: > Using MC for just wrapping a blob into an object file strikes me as something > MC is not intended for. > > @echristo -- is it OK to use MC as a tool in the standard compilation > pipeline? I vaguely recall we had a conversaion about using objcopy for > similar purposes during early days of CUDA and the conclusion was that we > generally don't want that. I might be wrong, too, it's been too long ago. Using llvm-mc the binary? No. That's definitely not something that should be done. And as far as objcopy we spent quite a bit of time pulling it out for split dwarf and, if possible, it shouldn't be used there either. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D110549/new/ https://reviews.llvm.org/D110549 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits