From fb9a5ce8672a01b4b82d10fe2518a047dc532da9 Mon Sep 17 00:00:00 2001 From: Kramer Peace Date: Mon, 2 Sep 2019 14:23:11 +0300 Subject: Add a CUDA linker object Fixes issue #5870 --- mesonbuild/environment.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'mesonbuild/environment.py') 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 -- cgit v1.1