CUDA and HIP action builder currently tries to do offloading for -M, which causes dependency file
not generated.
This patch changes action builder so that only host compilation is performed to generate dependency
file.
This assumes that the header files do not depend on whether it is device compilation or host
compilation. This is not ideal, but at least let projects using -M compile.
Ideally, we should create an offloading action for host dependency file and device dependency file
and merge them to be one dependency file, which will be done in a separate patch.