hip: add missing HIPCC_LINK_FLAGS_APPEND (#49436)

* hip: add missing HIPCC_LINK_FLAGS_APPEND

---------

Co-authored-by: rbberger <rbberger@users.noreply.github.com>
This commit is contained in:
Richard Berger 2025-03-24 14:58:47 -06:00 committed by GitHub
parent 1b829a4a28
commit 8ac826cca8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -499,9 +499,10 @@ def set_variables(self, env):
# bin/.hipVersion file can still be parsed. # bin/.hipVersion file can still be parsed.
# See also https://github.com/ROCm/HIP/issues/2223 # See also https://github.com/ROCm/HIP/issues/2223
env.append_path( env.append_path(
"HIPCC_COMPILE_FLAGS_APPEND", "HIPCC_COMPILE_FLAGS_APPEND", f"--rocm-path={paths['rocm-path']}", separator=" "
"--rocm-path={0}".format(paths["rocm-path"]), )
separator=" ", env.append_path(
"HIPCC_LINK_FLAGS_APPEND", f"--rocm-path={paths['rocm-path']}", separator=" "
) )
elif self.spec.satisfies("+cuda"): elif self.spec.satisfies("+cuda"):
env.set("CUDA_PATH", self.spec["cuda"].prefix) env.set("CUDA_PATH", self.spec["cuda"].prefix)
@ -518,6 +519,9 @@ def set_variables(self, env):
f"--gcc-toolchain={self.compiler.prefix}", f"--gcc-toolchain={self.compiler.prefix}",
separator=" ", separator=" ",
) )
env.append_path(
"HIPCC_LINK_FLAGS_APPEND", f"--gcc-toolchain={self.compiler.prefix}", separator=" "
)
# This is picked up by CMake when using HIP as a CMake language. # This is picked up by CMake when using HIP as a CMake language.
env.append_path("HIPFLAGS", f"--gcc-toolchain={self.compiler.prefix}", separator=" ") env.append_path("HIPFLAGS", f"--gcc-toolchain={self.compiler.prefix}", separator=" ")