Open
Description
#132096 introduced new llvm-gpu-loader
tool that can link to HSA and CUDA runtimes.
Both checks were added deep down the source tree, in tools/llvm-gpu-loader/CMakeLists.txt
:
Neither of them features a proper option()
to control the dependency, and on top of that, they are both marked QUIET
, so it's really easy to overlook this (as we did), and end up building packages that randomly depend on either of the runtimes, or miss the specific function.
Please:
- Do not use
QUIET
for package checks that control features included in installed tools. - Do not add dependency checks deep down the source tree — LLVM has a bunch of standard locations such as top
CMakeLists.txt
andcmake/config-ix.cmake
, where people actually look for changes like these. We don't really have the resources to monitor all 528CMakeLists.txt
files in LLVM alone. - Add
option()
s to control enabling the specific dependencies, so that we can cleanly control whether they are enabled or not, rather than being automatically linked if the build system incidentally happens to have them installed.