aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/compilers/cpp.py
diff options
context:
space:
mode:
authoralanNz <alangrimmer@gmail.com>2020-03-21 09:13:42 +1300
committerJussi Pakkanen <jpakkane@gmail.com>2020-03-21 00:47:24 +0200
commit74602928100394f6129e064f8e0bfe6c9e08c9d2 (patch)
treee3ae62b782a91ade9d68210a52cea35f18211d8e /mesonbuild/compilers/cpp.py
parent24227a95531b21a04bf2514a5b8f61ae29d47043 (diff)
downloadmeson-74602928100394f6129e064f8e0bfe6c9e08c9d2.zip
meson-74602928100394f6129e064f8e0bfe6c9e08c9d2.tar.gz
meson-74602928100394f6129e064f8e0bfe6c9e08c9d2.tar.bz2
-Add xc16 and c2000 C,Cpp toolchain support
Diffstat (limited to 'mesonbuild/compilers/cpp.py')
-rw-r--r--mesonbuild/compilers/cpp.py33
1 files changed, 33 insertions, 0 deletions
diff --git a/mesonbuild/compilers/cpp.py b/mesonbuild/compilers/cpp.py
index 2470bd5..ac0500a 100644
--- a/mesonbuild/compilers/cpp.py
+++ b/mesonbuild/compilers/cpp.py
@@ -29,6 +29,7 @@ from .compilers import (
from .c_function_attributes import CXX_FUNC_ATTRIBUTES, C_FUNC_ATTRIBUTES
from .mixins.clike import CLikeCompiler
from .mixins.ccrx import CcrxCompiler
+from .mixins.c2000 import C2000Compiler
from .mixins.arm import ArmCompiler, ArmclangCompiler
from .mixins.visualstudio import MSVCCompiler, ClangClCompiler
from .mixins.gnu import GnuCompiler
@@ -633,3 +634,35 @@ class CcrxCPPCompiler(CcrxCompiler, CPPCompiler):
def get_compiler_check_args(self):
return []
+
+class C2000CPPCompiler(C2000Compiler, CPPCompiler):
+ def __init__(self, exelist, version, for_machine: MachineChoice,
+ is_cross, info: 'MachineInfo', exe_wrap=None, **kwargs):
+ CPPCompiler.__init__(self, exelist, version, for_machine, is_cross,
+ info, exe_wrap, **kwargs)
+ C2000Compiler.__init__(self)
+
+ def get_options(self):
+ opts = CPPCompiler.get_options(self)
+ opts.update({'cpp_std': coredata.UserComboOption('C++ language standard to use',
+ ['none', 'c++03'],
+ 'none')})
+ return opts
+
+ def get_always_args(self):
+ return ['-nologo', '-lang=cpp']
+
+ def get_option_compile_args(self, options):
+ return []
+
+ def get_compile_only_args(self):
+ return []
+
+ def get_output_args(self, target):
+ return ['-output=obj=%s' % target]
+
+ def get_option_link_args(self, options):
+ return []
+
+ def get_compiler_check_args(self):
+ return []