This patch refactors the HIP tool chain for new HIP tool chain, HIPSPV
tool chain, which is added in the follow up patch part 2.
- Rename HIPToolChain to HIPAMDToolChain and Renames HIP.* files to HIPAMD.*.
- Introduce HIPUtility.* file where common HIP utilities, shared among HIP tool chain implementations, are placed in.
- Move constructHIPFatbinCommand() and constructGenerateObjFileFromHIPFatBinary() to HIPUtility. HIPSPV tool chain is going to use them.
- Tweak bundle target ID in constructHIPFatbinCommand(): extra dashes are dropped if the Target ID is empty and 'hip' offload kind is made default for non-AMD targets.
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.