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.
pull/12597/head
Eli Schwartz 1 year ago
parent 5f659af870
commit 39ecfc2d54
No known key found for this signature in database
GPG Key ID: CEB167EFB5722BD6
  1. 4
      mesonbuild/compilers/compilers.py
  2. 4
      mesonbuild/compilers/fortran.py
  3. 3
      mesonbuild/compilers/java.py
  4. 4
      mesonbuild/compilers/mixins/clike.py
  5. 3
      mesonbuild/compilers/mixins/pgi.py
  6. 3
      mesonbuild/compilers/rust.py
  7. 3
      mesonbuild/compilers/vala.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}')

@ -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):

@ -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 = './'

@ -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'

@ -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 []

@ -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 []

@ -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']

Loading…
Cancel
Save