aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBeau Johnston <beau@inbeta.org>2018-06-10 21:19:15 +1000
committerBeau Johnston <beau@inbeta.org>2018-06-10 21:19:15 +1000
commit8f0a118feb1191e3c5384d98f3246803cb64b9d8 (patch)
tree8f842a854f8869b8cda93b0d2256f2b04f6b7a15
parent96a6941c9cf6afab9e1ad8a234d2272be9a40639 (diff)
downloadmeson-8f0a118feb1191e3c5384d98f3246803cb64b9d8.zip
meson-8f0a118feb1191e3c5384d98f3246803cb64b9d8.tar.gz
meson-8f0a118feb1191e3c5384d98f3246803cb64b9d8.tar.bz2
fixed sideci for cuda compilation fix
-rw-r--r--mesonbuild/compilers/compilers.py8
-rw-r--r--mesonbuild/compilers/cuda.py6
-rw-r--r--mesonbuild/environment.py5
3 files changed, 7 insertions, 12 deletions
diff --git a/mesonbuild/compilers/compilers.py b/mesonbuild/compilers/compilers.py
index 36eedb2..6019a9b 100644
--- a/mesonbuild/compilers/compilers.py
+++ b/mesonbuild/compilers/compilers.py
@@ -130,10 +130,10 @@ gnulike_buildtype_args = {'plain': [],
'minsize': ['-Os', '-g']}
cuda_buildtype_args = {'plain': [],
- 'debug': ['-O0', '-g'],
- 'debugoptimized': ['-O1', '--debug'],
- 'release': ['-O3', '-Otime'],
- 'minsize': ['-O3', '-Ospace'],
+ 'debug': ['-O0', '-g'],
+ 'debugoptimized': ['-O1', '--debug'],
+ 'release': ['-O3', '-Otime'],
+ 'minsize': ['-O3', '-Ospace'],
}
arm_buildtype_args = {'plain': [],
diff --git a/mesonbuild/compilers/cuda.py b/mesonbuild/compilers/cuda.py
index 42b31af..1e427f1 100644
--- a/mesonbuild/compilers/cuda.py
+++ b/mesonbuild/compilers/cuda.py
@@ -16,8 +16,6 @@ import subprocess, os.path
from .. import mlog
from ..mesonlib import EnvironmentException, Popen_safe
-
-from .c import Compiler
from .compilers import Compiler, cuda_buildtype_args
class CudaCompiler(Compiler):
@@ -41,7 +39,6 @@ class CudaCompiler(Compiler):
return ['']
def sanity_check(self, work_dir, environment):
- code = 'class breakCCompiler;int main(int argc, char **argv) { return 0; }\n'
return True
def get_compiler_check_args(self):
@@ -110,7 +107,7 @@ class CudaCompiler(Compiler):
raise EnvironmentException('Executables created by {0} compiler {1} are not runnable.'.format(self.language, self.name_string()))
def get_output_args(self, target):
- return ['-o',target]
+ return ['-o', target]
def name_string(self):
return ' '.join(self.exelist)
@@ -161,4 +158,3 @@ class CudaCompiler(Compiler):
def linker_to_compiler_args(self, args):
return ['/link'] + args
-
diff --git a/mesonbuild/environment.py b/mesonbuild/environment.py
index cebc656..c5384cf 100644
--- a/mesonbuild/environment.py
+++ b/mesonbuild/environment.py
@@ -593,7 +593,7 @@ class Environment:
if isinstance(compiler, str):
compiler = [compiler]
else:
- raise EnvironmentException(m.format(err))
+ raise EnvironmentException()
arg = '--version'
try:
p, out, err = Popen_safe(compiler + [arg])
@@ -601,7 +601,6 @@ class Environment:
popen_exceptions[' '.join(compiler + [arg])] = e
continue
version = search_version(out)
- full_version = out.split('\n', 1)[0]
cls = CudaCompiler
return cls(ccache + compiler, version, is_cross, exe_wrap)
@@ -841,7 +840,7 @@ class Environment:
linkers = [linker]
else:
evar = 'AR'
- if isinstance(compiler,compilers.CudaCompiler):
+ if isinstance(compiler, compilers.CudaCompiler):
linkers = [self.cuda_static_linker, self.default_static_linker]
elif evar in os.environ:
linkers = [shlex.split(os.environ[evar])]