Use gcc toolchain when using hip and gcc host compiler (#48632)

This commit is contained in:
Tara Drwenski 2025-01-23 00:37:24 -07:00 committed by GitHub
parent 6f4ac31a67
commit 518572e710
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -293,6 +293,13 @@ def initconfig_hardware_entries(self):
entries.append(cmake_cache_string("AMDGPU_TARGETS", arch_str))
entries.append(cmake_cache_string("GPU_TARGETS", arch_str))
if spec.satisfies("%gcc"):
entries.append(
cmake_cache_string(
"CMAKE_HIP_FLAGS", f"--gcc-toolchain={self.pkg.compiler.prefix}"
)
)
return entries
def std_initconfig_entries(self):