diff options
| author | Eli Schwartz <eschwartz93@gmail.com> | 2023-12-05 14:48:39 -0500 |
|---|---|---|
| committer | Eli Schwartz <eschwartz93@gmail.com> | 2023-12-05 19:52:23 -0500 |
| commit | 39ecfc2d542ae7e248119b5dcb6f0a01493e2ae6 (patch) | |
| tree | 8aa83601e664b5bcd19f786df5a15f0c0fab141f /mesonbuild | |
| parent | 5f659af870011e74299d1455a65c2cd5f5ace51f (diff) | |
| download | meson-39ecfc2d542ae7e248119b5dcb6f0a01493e2ae6.tar.gz | |
compilers: drop dead code
no_warn_args is unused. Its only purpose was to implement automatic
hiding of UB in transpiled code, and it was not used at all in languages
other than C/C++ -- specifically when the C/C++ source files were
created by transpiling from vala or cython.
Diffstat (limited to 'mesonbuild')
| -rw-r--r-- | mesonbuild/compilers/compilers.py | 4 | ||||
| -rw-r--r-- | mesonbuild/compilers/fortran.py | 4 | ||||
| -rw-r--r-- | mesonbuild/compilers/java.py | 3 | ||||
| -rw-r--r-- | mesonbuild/compilers/mixins/clike.py | 4 | ||||
| -rw-r--r-- | mesonbuild/compilers/mixins/pgi.py | 3 | ||||
| -rw-r--r-- | mesonbuild/compilers/rust.py | 3 | ||||
| -rw-r--r-- | mesonbuild/compilers/vala.py | 3 |
7 files changed, 0 insertions, 24 deletions
diff --git a/mesonbuild/compilers/compilers.py b/mesonbuild/compilers/compilers.py index a7bb6c417..671e3f9cd 100644 --- a/mesonbuild/compilers/compilers.py +++ b/mesonbuild/compilers/compilers.py @@ -1377,10 +1377,6 @@ class Compiler(HoldableObject, metaclass=abc.ABCMeta): """Arguments required for a debug build.""" return [] - def get_no_warn_args(self) -> T.List[str]: - """Arguments to completely disable warnings.""" - return [] - def needs_static_linker(self) -> bool: raise NotImplementedError(f'There is no static linker for {self.language}') diff --git a/mesonbuild/compilers/fortran.py b/mesonbuild/compilers/fortran.py index a80fdff5f..e2c0f80bd 100644 --- a/mesonbuild/compilers/fortran.py +++ b/mesonbuild/compilers/fortran.py @@ -253,10 +253,6 @@ class G95FortranCompiler(FortranCompiler): def get_module_outdir_args(self, path: str) -> T.List[str]: return ['-fmod=' + path] - def get_no_warn_args(self) -> T.List[str]: - # FIXME: Confirm that there's no compiler option to disable all warnings - return [] - class SunFortranCompiler(FortranCompiler): diff --git a/mesonbuild/compilers/java.py b/mesonbuild/compilers/java.py index 9f508d637..fb81682ed 100644 --- a/mesonbuild/compilers/java.py +++ b/mesonbuild/compilers/java.py @@ -52,9 +52,6 @@ class JavaCompiler(BasicLinkerIsCompilerMixin, Compiler): def get_werror_args(self) -> T.List[str]: return ['-Werror'] - def get_no_warn_args(self) -> T.List[str]: - return ['-nowarn'] - def get_output_args(self, outputname: str) -> T.List[str]: if outputname == '': outputname = './' diff --git a/mesonbuild/compilers/mixins/clike.py b/mesonbuild/compilers/mixins/clike.py index ad8fa2747..3cf79a661 100644 --- a/mesonbuild/compilers/mixins/clike.py +++ b/mesonbuild/compilers/mixins/clike.py @@ -177,10 +177,6 @@ class CLikeCompiler(Compiler): # TODO: this should be an enum return self.warn_args[level] - def get_no_warn_args(self) -> T.List[str]: - # Almost every compiler uses this for disabling warnings - return ['-w'] - def get_depfile_suffix(self) -> str: return 'd' diff --git a/mesonbuild/compilers/mixins/pgi.py b/mesonbuild/compilers/mixins/pgi.py index 6362b46ac..7a242839b 100644 --- a/mesonbuild/compilers/mixins/pgi.py +++ b/mesonbuild/compilers/mixins/pgi.py @@ -61,9 +61,6 @@ class PGICompiler(Compiler): def get_module_incdir_args(self) -> T.Tuple[str]: return ('-module', ) - def get_no_warn_args(self) -> T.List[str]: - return ['-silent'] - def gen_import_library_args(self, implibname: str) -> T.List[str]: return [] diff --git a/mesonbuild/compilers/rust.py b/mesonbuild/compilers/rust.py index 1fb94aa44..1eac1c064 100644 --- a/mesonbuild/compilers/rust.py +++ b/mesonbuild/compilers/rust.py @@ -213,9 +213,6 @@ class RustCompiler(Compiler): # TODO: I'm not really sure what to put here, Rustc doesn't have warning return self._WARNING_LEVELS[level] - def get_no_warn_args(self) -> T.List[str]: - return self._WARNING_LEVELS["0"] - def get_pic_args(self) -> T.List[str]: # relocation-model=pic is rustc's default already. return [] diff --git a/mesonbuild/compilers/vala.py b/mesonbuild/compilers/vala.py index ded158e81..c0d006a2e 100644 --- a/mesonbuild/compilers/vala.py +++ b/mesonbuild/compilers/vala.py @@ -66,9 +66,6 @@ class ValaCompiler(Compiler): def get_warn_args(self, level: str) -> T.List[str]: return [] - def get_no_warn_args(self) -> T.List[str]: - return ['--disable-warnings'] - def get_werror_args(self) -> T.List[str]: return ['--fatal-warnings'] |
