1414from .base import DependencyException , SystemDependency
1515from .detect import packages
1616from ..mesonlib import LibType
17+ from ..interpreterbase import FeatureNew
1718
1819if T .TYPE_CHECKING :
1920 from ..environment import Environment
@@ -39,7 +40,10 @@ def __init__(self, environment: 'Environment', kwargs: T.Dict[str, T.Any]) -> No
3940 super ().__init__ ('cuda' , environment , kwargs , language = language )
4041 self .lib_modules : T .Dict [str , T .List [str ]] = {}
4142 self .requested_modules = self .get_requested (kwargs )
42- if not any (runtime in self .requested_modules for runtime in ['cudart' , 'cudart_static' ]):
43+ if 'cudart_none' in self .requested_modules :
44+ self .featurechecks .append (FeatureNew ('Cuda module cudart_none' , '1.10' ))
45+
46+ if not any (runtime in self .requested_modules for runtime in ['cudart' , 'cudart_static' , 'cudart_none' ]):
4347 # By default, we prefer to link the static CUDA runtime, since this is what nvcc also does by default:
4448 # https://docs.nvidia.com/cuda/cuda-compiler-driver-nvcc/index.html#cudart-none-shared-static-cudart
4549 req_modules = ['cudart' ]
@@ -322,6 +326,7 @@ def get_link_args(self, language: T.Optional[str] = None, raw: bool = False) ->
322326 REWRITE_MODULES = {
323327 'cudart' : ['-cudart' , 'shared' ],
324328 'cudart_static' : ['-cudart' , 'static' ],
329+ 'cudart_none' : ['-cudart' , 'none' ],
325330 'cudadevrt' : ['-cudadevrt' ],
326331 }
327332
0 commit comments