From 831d1e4c2e7b0ce8dfd0b2471bf2dab499181d66 Mon Sep 17 00:00:00 2001 From: "Bedarkar, Malhar" Date: Wed, 14 Mar 2018 22:42:06 -0500 Subject: - Updating cpp_std options similar to other compiler classes - Updating environment.py for selecting '--vsn' option for armcc only. - Updating build type arguments from GitHub pull request - 3157 Change-Id: Id3151e7715ec1016afdbd65391bb0d414ec7de13 --- mesonbuild/compilers/cpp.py | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) (limited to 'mesonbuild/compilers/cpp.py') diff --git a/mesonbuild/compilers/cpp.py b/mesonbuild/compilers/cpp.py index 1fa6f1573..15e8457e9 100644 --- a/mesonbuild/compilers/cpp.py +++ b/mesonbuild/compilers/cpp.py @@ -26,6 +26,7 @@ from .compilers import ( ClangCompiler, GnuCompiler, IntelCompiler, + ARMCompiler, ) class CPPCompiler(CCompiler): @@ -133,6 +134,35 @@ class GnuCPPCompiler(GnuCompiler, CPPCompiler): return ['-fpch-preprocess', '-include', os.path.basename(header)] +class ARMCPPCompiler(ARMCompiler, CPPCompiler): + def __init__(self, exelist, version, is_cross, exe_wrap=None, defines=None, **kwargs): + CPPCompiler.__init__(self, exelist, version, is_cross, exe_wrap, **kwargs) + ARMCompiler.__init__(self, defines) + default_warn_args = [] + self.warn_args = {'1': default_warn_args, + '2': default_warn_args + [], + '3': default_warn_args + []} + + def get_options(self): + opts = {'cpp_std': coredata.UserComboOption('cpp_std', 'C++ language standard to use', + ['none', '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') + return args + + def get_option_link_args(self, options): + return [] + + def get_compiler_check_args(self): + return [] + + class IntelCPPCompiler(IntelCompiler, CPPCompiler): def __init__(self, exelist, version, icc_type, is_cross, exe_wrap, **kwargs): CPPCompiler.__init__(self, exelist, version, is_cross, exe_wrap, **kwargs) -- cgit v1.2.3