diff options
author | Beau Johnston <beau@inbeta.org> | 2018-06-10 07:48:06 +1000 |
---|---|---|
committer | Beau Johnston <beau@inbeta.org> | 2018-06-10 07:48:06 +1000 |
commit | 96a6941c9cf6afab9e1ad8a234d2272be9a40639 (patch) | |
tree | 08f31a0d51d9b507f59702fafdca42ce81ab0191 /mesonbuild/compilers/compilers.py | |
parent | ec616c2aa5584d116116713f5b0286e428bb9b45 (diff) | |
parent | cf3541163a6d1858d4a22723fc3291f5519ae6cf (diff) | |
download | meson-96a6941c9cf6afab9e1ad8a234d2272be9a40639.zip meson-96a6941c9cf6afab9e1ad8a234d2272be9a40639.tar.gz meson-96a6941c9cf6afab9e1ad8a234d2272be9a40639.tar.bz2 |
Merge branch 'cuda_compiler'
Diffstat (limited to 'mesonbuild/compilers/compilers.py')
-rw-r--r-- | mesonbuild/compilers/compilers.py | 11 |
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'], |