cuda: pull in libdir when linking C/C++

* In `CudaDependency._detect_language`, the first detected language is
  considered the linking one. Since `nvcc`/`cuda` implicitly know where the
  cuda dependency lives, this leads to situations where `cpp` as linking
  language is erroneously detected as `cuda` and then misses the `-L` argument.
This commit is contained in:
David Seifert 2024-05-08 00:55:03 +02:00 committed by Dylan Baker
parent 8cb16b2d6a
commit 33adc420f3
1 changed files with 1 additions and 1 deletions

View File

@ -24,7 +24,7 @@ if T.TYPE_CHECKING:
class CudaDependency(SystemDependency):
supported_languages = ['cuda', 'cpp', 'c'] # see also _default_language
supported_languages = ['cpp', 'c', 'cuda'] # see also _default_language
def __init__(self, environment: 'Environment', kwargs: T.Dict[str, T.Any]) -> None:
compilers = environment.coredata.compilers[self.get_for_machine_from_kwargs(kwargs)]