Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
rocm: hip_toolchain_override rule to compile rocm-related projects
Summary: Sometimes we want to compile C/C++ sources that _aren't_ .hip files. The cxx toolchains today only use the rocm toolchain if you give it a .hip file. So what do we do? We can either: 1. Rename all the .cpp files as .hip so cxx rules pick the right toolchain. This is kinda meh, and unclear if this would work for header files either. 2. We can construct our own toolchain override and use the `hip_compiler_info` instead of `cxx_compiler_info` (2) is what this diff is. `hip_toolchain_override` borrows from `cxx_toolchain_override` and overrides enough of the toolchain info struct to s/cxx/hip/ for things that matter. This also overrides some linking behavior so we can maybe get to the point to where we can replace the `hip_link` rccl action with a real `cxx_library`. Reviewed By: blackm00n Differential Revision: D69506114 fbshipit-source-id: 018f28c9141155c9cf5d8f04211595f95ef62b43
- Loading branch information