Skip to content

Conversation

@rbberger
Copy link
Member

@rbberger rbberger commented Nov 14, 2025

The usage of --gcc-toolchain has been discouraged by LLVM for some time now (see llvm/llvm-project#77537). While --gcc-toolchain still works, this should future proofs the hip dependent package logic.

Note

The setup_dependent_build_environment logic in the hip packages depends on a compiler dependency. However, > externals don't automatically gain one during concretization. So this should be better documented.

Externals of hip can specify a GCC compiler so that the correct GCC installation is selected for hipcc. This becomes > relevant for compilations with newer C++ standards, where the default system GCC might be too old.

packages:
  hip:
    externals:
    - spec: "[email protected] %[email protected]"
      prefix: /opt/rocm-6.4.3
    buildable: false

Comment on lines 427 to 430
env.append_path("HIPCC_COMPILE_FLAGS_APPEND", gcc_install_dir_flag, separator=" ")
env.append_path("HIPCC_LINK_FLAGS_APPEND", gcc_install_dir_flag, separator=" ")
# This is picked up by CMake when using HIP as a CMake language.
env.append_path("HIPFLAGS", gcc_install_dir_flag, separator=" ")
Copy link
Member

Choose a reason for hiding this comment

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

I think you can use env.append_flags to avoid having to explicitly set the separator.

Copy link
Member Author

Choose a reason for hiding this comment

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

@becker33 Fixed

becker33
becker33 previously approved these changes Jan 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants