Skip to content

Conversation

lamb-j
Copy link
Contributor

@lamb-j lamb-j commented Aug 15, 2025

The new driver in clang requires linking against the HIP libraries, so we need to add a --hip-link option here to enforce linking

Without it, we'll get an error on the link step of check_cxx_compiler_flag() when calling with "-xhip" and "--offload-arch"

Note: The link step isn't really needed for this use case, as invalid targets will fail the compilation step. But check_cxx_compiler_flag() performs both compiling and linking by default

The new driver in clang does not automatically link against the HIP libraries, so we need to add a --hip-link option here to enforce linking. Otherwise we'll get an error on the link stem of check_cxx_compiler_flag() when calling with "-xhip" and "--offload-arch"

Note: The link step isn't really needed for this use case, as invalid targets will fail the compilation step. But check_cxx_compiler_flag() performs both compiling and linking by default
Copy link

@jhuber6 jhuber6 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is reasonable to require that the link step has the hip libraries. The reason the change to the new driver broke this behavior is because it unconditionally emits HIP runtime calls even with no kernel calls, the previous version would skip those if they weren't present.

@cgmb cgmb merged commit 10155d7 into develop Aug 20, 2025
9 of 21 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants