aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/compilers/cpp.py
diff options
context:
space:
mode:
authorJussi Pakkanen <jpakkane@gmail.com>2018-04-16 23:02:09 +0300
committerJussi Pakkanen <jpakkane@gmail.com>2018-04-16 23:02:09 +0300
commitc58dd64f8e947f4659bcbc47d75e86e65043e714 (patch)
tree28be176b2646b02ae6cc006a00608a1152db35be /mesonbuild/compilers/cpp.py
parentfa6ca160548d7e8df9c4c724e6c96f5e004e5316 (diff)
parent7f8908336362cccd45516f48b5320380cec0e817 (diff)
downloadmeson-c58dd64f8e947f4659bcbc47d75e86e65043e714.zip
meson-c58dd64f8e947f4659bcbc47d75e86e65043e714.tar.gz
meson-c58dd64f8e947f4659bcbc47d75e86e65043e714.tar.bz2
Merged Arm CC support.
Diffstat (limited to 'mesonbuild/compilers/cpp.py')
-rw-r--r--mesonbuild/compilers/cpp.py28
1 files changed, 28 insertions, 0 deletions
diff --git a/mesonbuild/compilers/cpp.py b/mesonbuild/compilers/cpp.py
index 3804059..8dd2306 100644
--- a/mesonbuild/compilers/cpp.py
+++ b/mesonbuild/compilers/cpp.py
@@ -27,6 +27,7 @@ from .compilers import (
GnuCompiler,
ElbrusCompiler,
IntelCompiler,
+ ArmCompiler,
)
class CPPCompiler(CCompiler):
@@ -239,3 +240,30 @@ class VisualStudioCPPCompiler(VisualStudioCCompiler, CPPCompiler):
# Visual Studio C++ compiler doesn't support -fpermissive,
# so just use the plain C args.
return super(VisualStudioCCompiler, self).get_compiler_check_args()
+
+
+class ArmCPPCompiler(ArmCompiler, CPPCompiler):
+ def __init__(self, exelist, version, is_cross, exe_wrap=None, **kwargs):
+ CPPCompiler.__init__(self, exelist, version, is_cross, exe_wrap, **kwargs)
+ ArmCompiler.__init__(self)
+
+ def get_options(self):
+ opts = {'cpp_std': coredata.UserComboOption('cpp_std', 'C++ language standard to use',
+ ['none', 'c++03', 'c++11'],
+ 'none')}
+ return opts
+
+ def get_option_compile_args(self, options):
+ args = []
+ std = options['cpp_std']
+ if std.value == 'c++11':
+ args.append('--cpp11')
+ elif std.value == 'c++03':
+ args.append('--cpp')
+ return args
+
+ def get_option_link_args(self, options):
+ return []
+
+ def get_compiler_check_args(self):
+ return []