FindCUDAToolkit: nvrtc shouldn't hard depend on nvJitLink

The dependency on nvJitLink was due to misunderstanding how runtime compiled code that uses
LTO is used. It doesn't require nvrtc to have a dependency on nvJitLink, just the caller.
This commit is contained in:
Robert Maynard 2024-10-14 10:15:58 -04:00
parent 18d60772ef
commit 9d29544082
No known key found for this signature in database

View File

@ -1356,11 +1356,11 @@ if(CUDAToolkit_FOUND)
endif()
_CUDAToolkit_find_and_add_import_lib(nvrtc_builtins ALT nvrtc-builtins)
_CUDAToolkit_find_and_add_import_lib(nvrtc DEPS nvJitLink)
_CUDAToolkit_find_and_add_import_lib(nvrtc)
if(CUDAToolkit_VERSION VERSION_GREATER_EQUAL 11.5.0)
_CUDAToolkit_find_and_add_import_lib(nvrtc_builtins_static ALT nvrtc-builtins_static)
if(NOT TARGET CUDA::nvrtc_static)
_CUDAToolkit_find_and_add_import_lib(nvrtc_static DEPS nvrtc_builtins_static nvptxcompiler_static nvJitLink_static)
_CUDAToolkit_find_and_add_import_lib(nvrtc_static DEPS nvrtc_builtins_static nvptxcompiler_static)
if(TARGET CUDA::nvrtc_static AND WIN32 AND NOT (BORLAND OR MINGW OR CYGWIN))
target_link_libraries(CUDA::nvrtc_static INTERFACE Ws2_32.lib)
endif()