diff options
author | Jussi Pakkanen <jpakkane@gmail.com> | 2019-01-21 23:59:20 +0200 |
---|---|---|
committer | Jussi Pakkanen <jpakkane@gmail.com> | 2019-01-21 23:59:20 +0200 |
commit | e1b50309dfd9c927866f36a0a4662321351ab697 (patch) | |
tree | b3fb38d1a391f4e33004b95eba2ea6d17a8dd762 /mesonbuild/compilers | |
parent | 140975116905e7637e906e645b588e03b8c3aebb (diff) | |
download | meson-e1b50309dfd9c927866f36a0a4662321351ab697.zip meson-e1b50309dfd9c927866f36a0a4662321351ab697.tar.gz meson-e1b50309dfd9c927866f36a0a4662321351ab697.tar.bz2 |
All the fixes needed to make work against current master.
Diffstat (limited to 'mesonbuild/compilers')
-rw-r--r-- | mesonbuild/compilers/compilers.py | 19 | ||||
-rw-r--r-- | mesonbuild/compilers/cuda.py | 11 |
2 files changed, 25 insertions, 5 deletions
diff --git a/mesonbuild/compilers/compilers.py b/mesonbuild/compilers/compilers.py index b2dc213..b1f3cc2 100644 --- a/mesonbuild/compilers/compilers.py +++ b/mesonbuild/compilers/compilers.py @@ -146,10 +146,10 @@ armclang_buildtype_args = {'plain': [], } cuda_buildtype_args = {'plain': [], - 'debug': ['-O0', '-g'], - 'debugoptimized': ['-O1', '--debug'], - 'release': ['-O3', '-Otime'], - 'minsize': ['-O3', '-Ospace'], + 'debug': [], + 'debugoptimized': [], + 'release': [], + 'minsize': [], } arm_buildtype_args = {'plain': [], @@ -354,6 +354,17 @@ msvc_optimization_args = {'0': [], 's': ['/O1'], # Implies /Os. } +cuda_optimization_args = {'0': [], + 'g': ['-O0'], + '1': ['-O1'], + '2': ['-O2'], + '3': ['-O3', '-Otime'], + 's': ['-O3', '-Ospace'] + } + +cuda_debug_args = {False: [], + True: ['-g']} + clike_debug_args = {False: [], True: ['-g']} diff --git a/mesonbuild/compilers/cuda.py b/mesonbuild/compilers/cuda.py index 7beecf9..b5f16ab 100644 --- a/mesonbuild/compilers/cuda.py +++ b/mesonbuild/compilers/cuda.py @@ -16,7 +16,7 @@ import subprocess, os.path from .. import mlog from ..mesonlib import EnvironmentException, Popen_safe -from .compilers import Compiler, cuda_buildtype_args +from .compilers import Compiler, cuda_buildtype_args, cuda_optimization_args, cuda_debug_args class CudaCompiler(Compiler): def __init__(self, exelist, version, is_cross, exe_wrapper=None): @@ -151,6 +151,12 @@ __global__ void kernel (void) { def get_no_optimization_args(self): return ['-O0'] + def get_optimization_args(self, optimization_level): + return cuda_optimization_args[optimization_level] + + def get_debug_args(self, is_debug): + return cuda_debug_args[is_debug] + def get_linker_exelist(self): return self.exelist[:] @@ -191,3 +197,6 @@ __global__ void kernel (void) { def get_pic_args(self): return [] + + def compute_parameters_with_absolute_paths(self, parameter_list, build_dir): + return [] |