aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/compilers/compilers.py
diff options
context:
space:
mode:
authorBeau Johnston <beau@inbeta.org>2018-06-10 07:42:50 +1000
committerBeau Johnston <beau@inbeta.org>2018-06-10 07:42:50 +1000
commitcf3541163a6d1858d4a22723fc3291f5519ae6cf (patch)
treedbfebd1b469236814221d3192a18fbe3f96b2908 /mesonbuild/compilers/compilers.py
parent83665a482a13fa82989103989b544e30f1308795 (diff)
downloadmeson-cf3541163a6d1858d4a22723fc3291f5519ae6cf.zip
meson-cf3541163a6d1858d4a22723fc3291f5519ae6cf.tar.gz
meson-cf3541163a6d1858d4a22723fc3291f5519ae6cf.tar.bz2
added cuda compiler
Diffstat (limited to 'mesonbuild/compilers/compilers.py')
-rw-r--r--mesonbuild/compilers/compilers.py11
1 files changed, 10 insertions, 1 deletions
diff --git a/mesonbuild/compilers/compilers.py b/mesonbuild/compilers/compilers.py
index 0022b67..36eedb2 100644
--- a/mesonbuild/compilers/compilers.py
+++ b/mesonbuild/compilers/compilers.py
@@ -33,6 +33,7 @@ lib_suffixes = ('a', 'lib', 'dll', 'dylib', 'so')
lang_suffixes = {
'c': ('c',),
'cpp': ('cpp', 'cc', 'cxx', 'c++', 'hh', 'hpp', 'ipp', 'hxx'),
+ 'cuda': ('cu',),
# f90, f95, f03, f08 are for free-form fortran ('f90' recommended)
# f, for, ftn, fpp are for fixed-form fortran ('f' or 'for' recommended)
'fortran': ('f90', 'f95', 'f03', 'f08', 'f', 'for', 'ftn', 'fpp'),
@@ -50,7 +51,7 @@ cpp_suffixes = lang_suffixes['cpp'] + ('h',)
c_suffixes = lang_suffixes['c'] + ('h',)
# List of languages that can be linked with C code directly by the linker
# used in build.py:process_compilers() and build.py:get_dynamic_linker()
-clike_langs = ('d', 'objcpp', 'cpp', 'objc', 'c', 'fortran',)
+clike_langs = ('d', 'cuda', 'objcpp', 'cpp', 'objc', 'c', 'fortran',)
clike_suffixes = ()
for _l in clike_langs:
clike_suffixes += lang_suffixes[_l]
@@ -61,6 +62,7 @@ soregex = re.compile(r'.*\.so(\.[0-9]+)?(\.[0-9]+)?(\.[0-9]+)?$')
# Environment variables that each lang uses.
cflags_mapping = {'c': 'CFLAGS',
'cpp': 'CXXFLAGS',
+ 'cuda': 'CUFLAGS',
'objc': 'OBJCFLAGS',
'objcpp': 'OBJCXXFLAGS',
'fortran': 'FFLAGS',
@@ -127,6 +129,13 @@ gnulike_buildtype_args = {'plain': [],
'release': ['-O3'],
'minsize': ['-Os', '-g']}
+cuda_buildtype_args = {'plain': [],
+ 'debug': ['-O0', '-g'],
+ 'debugoptimized': ['-O1', '--debug'],
+ 'release': ['-O3', '-Otime'],
+ 'minsize': ['-O3', '-Ospace'],
+ }
+
arm_buildtype_args = {'plain': [],
'debug': ['-O0', '--debug'],
'debugoptimized': ['-O1', '--debug'],