Skip to content

Commit

Permalink
cuda: pull in libdir when linking C/C++
Browse files Browse the repository at this point in the history
* 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.
  • Loading branch information
SoapGentoo committed May 7, 2024
1 parent a0ff145 commit 7a0f9a5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mesonbuild/dependencies/cuda.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

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)]
Expand Down

0 comments on commit 7a0f9a5

Please sign in to comment.