-
Notifications
You must be signed in to change notification settings - Fork 14.3k
[offload][runtimes] Forward user-provided system configuration. #96303
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
We should probably fix that. |
Seems like a generalisation of the code already added for libc, so no objections from me here. @jhuber6 should be the approver, as the author of the original code. |
3de162f sets it to |
No, it takes the directory of |
OK, it does |
Oh yeah, now I remember. I used the old one because that came in CMake 3.18 so it was the only solution before we moved to 3.20. We can definitely use the "official" one now, but probably doesn't make much of a difference. |
…96303) In order for LLVM_ENABLE_RUNTIMES projects to find their requirements, they need access to user-provided configuration options such as `CMAKE_PREFIX_PATH`. Forward a selection of configuration options such that runtimes uses the same system introspection as LLVM and LLVM_ENABLE_PROJECTS do. The concrete symptom this is solving is that the path to CUDA is provided using `cmake -DCUDA_TOOLKIT_ROOT_DIR=/opt/cuda` or `CUDA_PATH`, but is ignored by offload. Handling for this case already existed for libc, but only when it was enabled and only `CUDAToolkit_ROOT` (The former is for `find_package(CUDA)`, the latter for `find_package(CUDAToolkit)`, `CUDA_PATH` is used by `find_package(CUDAToolkit)` and `enable_language(CUDA)`).
In order for LLVM_ENABLE_RUNTIMES projects to find their requirements, they need access to user-provided configuration options such as
CMAKE_PREFIX_PATH
. Forward a selection of configuration options sich that runtimes uses the same system introspection as LLVM and LLVM_ENABLE_PROJECTS do.The concrete symptom this is solving is that the path to CUDA is provided using
cmake -DCUDA_TOOLKIT_ROOT_DIR=/opt/cuda
orCUDA_PATH
, but is ignored by offload. Handling for this case already existed for libc, but only when it was enabled and onlyCUDAToolkit_ROOT
(The former is forfind_package(CUDA)
, the latter forfind_package(CUDAToolkit)
,CUDA_PATH
is used byfind_package(CUDAToolkit)
andenable_language(CUDA)
).CUDA_TOOLKIT_ROOT_DIR
is actually deprecated but still used and required byoffload/test/lit.site.cfg.in
.