diff options
author | Jussi Pakkanen <jpakkane@gmail.com> | 2019-06-17 21:49:34 +0300 |
---|---|---|
committer | Jussi Pakkanen <jpakkane@gmail.com> | 2019-06-17 21:49:34 +0300 |
commit | f16bd54da6d2334fd6d36b0e2c2729e1cf1bdc05 (patch) | |
tree | 4984eae4ce3dc553d28412ddc03f159882f793d5 | |
parent | 9933b33c553235b1ce95b8406a6660678cd3af26 (diff) | |
download | meson-cudathreads.tar.gz |
Handle thread flags when not using C at all. Closes #5497.cudathreads
-rw-r--r-- | mesonbuild/dependencies/misc.py | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/mesonbuild/dependencies/misc.py b/mesonbuild/dependencies/misc.py index af2da29b6..e5fab6459 100644 --- a/mesonbuild/dependencies/misc.py +++ b/mesonbuild/dependencies/misc.py @@ -388,8 +388,14 @@ class ThreadDependency(ExternalDependency): super().__init__('threads', environment, None, kwargs) self.name = 'threads' self.is_found = True - self.compile_args = self.clib_compiler.thread_flags(environment) - self.link_args = self.clib_compiler.thread_link_flags(environment) + # Happens if you are using a language with threads + # concept without C, such as plain Cuda. + if self.clib_compiler is None: + self.compile_args = [] + self.link_args = [] + else: + self.compile_args = self.clib_compiler.thread_flags(environment) + self.link_args = self.clib_compiler.thread_link_flags(environment) class Python3Dependency(ExternalDependency): |