diff options
author | Nathanael Gray <nathanael.gray@fphcare.co.nz> | 2021-11-12 12:04:08 +1300 |
---|---|---|
committer | Jussi Pakkanen <jpakkane@gmail.com> | 2021-11-14 21:59:59 +0200 |
commit | ae3d495c370645957835bdf1dfa464d79e668420 (patch) | |
tree | 2555efb52ed073e8e8f115c5fe0ec2bcefefbfbf /mesonbuild/compilers | |
parent | 0bc0905210c500f3d9c4d1de7cea882133416d34 (diff) | |
download | meson-ae3d495c370645957835bdf1dfa464d79e668420.zip meson-ae3d495c370645957835bdf1dfa464d79e668420.tar.gz meson-ae3d495c370645957835bdf1dfa464d79e668420.tar.bz2 |
Remove incorrect arguments for C2000 C++ compiler. Add correct form for output and include args.
Diffstat (limited to 'mesonbuild/compilers')
-rw-r--r-- | mesonbuild/compilers/cpp.py | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/mesonbuild/compilers/cpp.py b/mesonbuild/compilers/cpp.py index 50e91a3..8bc013f 100644 --- a/mesonbuild/compilers/cpp.py +++ b/mesonbuild/compilers/cpp.py @@ -838,20 +838,21 @@ class C2000CPPCompiler(C2000Compiler, CPPCompiler): opts[key].choices = ['none', 'c++03'] return opts - def get_always_args(self) -> T.List[str]: - return ['-nologo', '-lang=cpp'] - def get_option_compile_args(self, options: 'KeyedOptionDictType') -> T.List[str]: - return [] + args = [] + key = OptionKey('std', machine=self.for_machine, lang=self.language) + std = options[key] + if std.value != 'none': + args.append('--' + std.value) + return args - def get_compile_only_args(self) -> T.List[str]: - return [] + def get_no_optimization_args(self) -> T.List[str]: + return ['-Ooff'] def get_output_args(self, target: str) -> T.List[str]: - return [f'-output=obj={target}'] - - def get_option_link_args(self, options: 'KeyedOptionDictType') -> T.List[str]: - return [] + return [f'--output_file={target}'] - def get_compiler_check_args(self, mode: CompileCheckMode) -> T.List[str]: - return [] + def get_include_args(self, path: str, is_system: bool) -> T.List[str]: + if path == '': + path = '.' + return ['--include_path=' + path] |