diff options
| author | Benjamin Gilbert <bgilbert@backtick.net> | 2024-04-12 05:05:08 +0900 |
|---|---|---|
| committer | Dylan Baker <dylan@pnwbakers.com> | 2024-04-27 08:09:03 -0700 |
| commit | 1684259f10cc129c922e38e4f1325aef876773d6 (patch) | |
| tree | 951568d5aba4725508da30db2da0e73c3068640a /mesonbuild/compilers/cs.py | |
| parent | f8d957febfd6be465074c244b871fd940e79bb40 (diff) | |
| download | meson-1684259f10cc129c922e38e4f1325aef876773d6.tar.gz | |
backend/ninja: use generate_basic_compiler_args() for C#, Java, Swift
C#, Java, and Swift targets were manually collecting compiler arguments
rather than using the helper function for this purpose. This caused each
target type to add arguments in a different order, and to forget to add
some arguments respectively:
C#: /nologo, -warnaserror
Java: warning level (-nowarn, -Xlint:all, -Xdoclint:all), debug arguments
(-g, -g:none), -Werror
Swift: -warnings-as-errors
Fix this. Also fix up some no-longer-unused argument processing in the
Compiler implementations.
Diffstat (limited to 'mesonbuild/compilers/cs.py')
| -rw-r--r-- | mesonbuild/compilers/cs.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/mesonbuild/compilers/cs.py b/mesonbuild/compilers/cs.py index 3a6365f42..38bb33866 100644 --- a/mesonbuild/compilers/cs.py +++ b/mesonbuild/compilers/cs.py @@ -14,6 +14,7 @@ from .compilers import Compiler from .mixins.islinker import BasicLinkerIsCompilerMixin if T.TYPE_CHECKING: + from ..dependencies import Dependency from ..envconfig import MachineInfo from ..environment import Environment from ..mesonlib import MachineChoice @@ -60,6 +61,12 @@ class CsCompiler(BasicLinkerIsCompilerMixin, Compiler): def get_pic_args(self) -> T.List[str]: return [] + def get_dependency_compile_args(self, dep: Dependency) -> T.List[str]: + # Historically we ignored all compile args. Accept what we can, but + # filter out -I arguments, which are in some pkg-config files and + # aren't accepted by mcs. + return [a for a in dep.get_compile_args() if not a.startswith('-I')] + def compute_parameters_with_absolute_paths(self, parameter_list: T.List[str], build_dir: str) -> T.List[str]: for idx, i in enumerate(parameter_list): |
