[HIP] Fix -fgpu-allow-device-init option
authorYaxun (Sam) Liu <yaxun.liu@amd.com>
Wed, 30 Sep 2020 03:52:03 +0000 (23:52 -0400)
committerYaxun (Sam) Liu <yaxun.liu@amd.com>
Mon, 5 Oct 2020 02:13:05 +0000 (22:13 -0400)
commite372c1d7624e2402a5f91a640780fb32649922b6
tree986e89f6413d39baa6527c82083be486690dc959
parent5b551b79d3bba5a8a282bf5f72c7baaccf925870
[HIP] Fix -fgpu-allow-device-init option

The option needs to be passed to both host and device compilation.

Differential Revision: https://reviews.llvm.org/D88550
clang/lib/Driver/ToolChains/Clang.cpp
clang/lib/Driver/ToolChains/HIP.cpp
clang/test/Driver/hip-options.hip