diff options
author | Kramer Peace <kpeace1@gmail.com> | 2019-09-02 14:23:11 +0300 |
---|---|---|
committer | Dylan Baker <dylan@pnwbakers.com> | 2019-09-05 08:38:56 -0700 |
commit | fb9a5ce8672a01b4b82d10fe2518a047dc532da9 (patch) | |
tree | 55115636518d01cd3b26f3e16fd18733f530dabb /mesonbuild/environment.py | |
parent | bd37147b4b46081c58e0b15f6a0f0123099b27b1 (diff) | |
download | meson-fb9a5ce8672a01b4b82d10fe2518a047dc532da9.zip meson-fb9a5ce8672a01b4b82d10fe2518a047dc532da9.tar.gz meson-fb9a5ce8672a01b4b82d10fe2518a047dc532da9.tar.bz2 |
Add a CUDA linker object
Fixes issue #5870
Diffstat (limited to 'mesonbuild/environment.py')
-rw-r--r-- | mesonbuild/environment.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/mesonbuild/environment.py b/mesonbuild/environment.py index 7386965..b53c6f5 100644 --- a/mesonbuild/environment.py +++ b/mesonbuild/environment.py @@ -55,6 +55,7 @@ from .linkers import ( XildAppleDynamicLinker, XildLinuxDynamicLinker, XilinkDynamicLinker, + CudaLinker, ) from functools import lru_cache from .compilers import ( @@ -696,6 +697,9 @@ class Environment: `-Xlinker=--version`) you must pass as a list. :extra_args: Any addtional arguments rquired (such as a source file) """ + if CudaCompiler.cuda_id() in compiler: + return CudaLinker(compiler, for_machine, 'nvlink', prefix, version=CudaLinker.parse_version()) + extra_args = typing.cast(typing.List[str], extra_args or []) if isinstance(prefix, str): check_args = [prefix + '--version'] + extra_args |