diff options
author | Aleksey Gurtovoy <agurtovoy@acm.org> | 2019-09-06 12:31:26 -0500 |
---|---|---|
committer | Dylan Baker <dylan@pnwbakers.com> | 2019-09-24 14:22:20 -0700 |
commit | 6ac5db50c901f172176b297d087e6123df497062 (patch) | |
tree | c57cab2ef12633b760ab0189539a932e3b465817 /mesonbuild/environment.py | |
parent | 1670fca36fcb1a4fe4780e96731e954515501a35 (diff) | |
download | meson-6ac5db50c901f172176b297d087e6123df497062.zip meson-6ac5db50c901f172176b297d087e6123df497062.tar.gz meson-6ac5db50c901f172176b297d087e6123df497062.tar.bz2 |
CUDA support on Windows
Diffstat (limited to 'mesonbuild/environment.py')
-rw-r--r-- | mesonbuild/environment.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/mesonbuild/environment.py b/mesonbuild/environment.py index f5b24d8..8a13b5e 100644 --- a/mesonbuild/environment.py +++ b/mesonbuild/environment.py @@ -1000,6 +1000,7 @@ class Environment: def detect_cuda_compiler(self, for_machine): popen_exceptions = {} + is_cross = not self.machines.matches_build_machine(for_machine) compilers, ccache, exe_wrap = self._get_compilers('cuda', for_machine) for compiler in compilers: if isinstance(compiler, str): @@ -1028,8 +1029,9 @@ class Environment: # Luckily, the "V" also makes it very simple to extract # the full version: version = out.strip().split('V')[-1] + cpp_compiler = self.detect_cpp_compiler(for_machine) linker = CudaLinker(compiler, for_machine, 'nvlink', CudaCompiler.LINKER_PREFIX, version=CudaLinker.parse_version()) - return CudaCompiler(ccache + compiler, version, for_machine, exe_wrap, linker=linker) + return CudaCompiler(ccache + compiler, version, for_machine, is_cross, exe_wrap, host_compiler=cpp_compiler, linker=linker) raise EnvironmentException('Could not find suitable CUDA compiler: "' + ' '.join(compilers) + '"') def detect_fortran_compiler(self, for_machine: MachineChoice): |