[libc-commits] [PATCH] D147653: [libc] Search for the CUDA patch explicitly when testing
Artem Belevich via Phabricator via libc-commits
libc-commits at lists.llvm.org
Wed Apr 5 12:37:49 PDT 2023
tra accepted this revision.
tra added inline comments.
This revision is now accepted and ready to land.
================
Comment at: libc/cmake/modules/prepare_libc_gpu_build.cmake:105
+ if(CUDAToolkit_FOUND)
+ get_filename_component(LIBC_CUDA_ROOT "${CUDAToolkit_BIN_DIR}/.." ABSOLUTE)
+ endif()
----------------
Nit: `..` may potentially backfire if we're operating on a tree of symlinks, depending on whether cmake would actually traverse the filesystem, or process the `,,` itself and just stripping one path component.
It may be safer to calculate absolute path to `CUDAToolkit_BIN_DIR` and then use `get_filename_component(DIRECTORY)` on it.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D147653/new/
https://reviews.llvm.org/D147653
More information about the libc-commits
mailing list