aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/compilers.py
diff options
context:
space:
mode:
authorJussi Pakkanen <jpakkane@gmail.com>2016-09-10 17:05:20 +0300
committerJussi Pakkanen <jpakkane@gmail.com>2016-09-10 17:05:20 +0300
commit5833d23e7643c07f9c50843414032ae2e2d4094e (patch)
tree56ed29dfdcc3693fdcd9f3c2cae3e2d18be5a0e2 /mesonbuild/compilers.py
parent85c2f670795f97dfc3f7474971457ef604ef0be3 (diff)
downloadmeson-5833d23e7643c07f9c50843414032ae2e2d4094e.zip
meson-5833d23e7643c07f9c50843414032ae2e2d4094e.tar.gz
meson-5833d23e7643c07f9c50843414032ae2e2d4094e.tar.bz2
Made objc compilers use Gnu class.
Diffstat (limited to 'mesonbuild/compilers.py')
-rw-r--r--mesonbuild/compilers.py36
1 files changed, 4 insertions, 32 deletions
diff --git a/mesonbuild/compilers.py b/mesonbuild/compilers.py
index ff3e26a..4c9fd2e 100644
--- a/mesonbuild/compilers.py
+++ b/mesonbuild/compilers.py
@@ -2050,15 +2050,13 @@ class GnuCPPCompiler(GnuCompiler, CPPCompiler):
return options['cpp_winlibs'].value
return []
-class GnuObjCCompiler(ObjCCompiler):
- std_opt_args = ['-O2']
+class GnuObjCCompiler(GnuCompiler,ObjCCompiler):
def __init__(self, exelist, version, is_cross, exe_wrapper=None):
ObjCCompiler.__init__(self, exelist, version, is_cross, exe_wrapper)
- self.id = 'gcc'
# Not really correct, but GNU objc is only used on non-OSX non-win. File a bug
# if this breaks your use case.
- self.gcc_type = GCC_STANDARD
+ GnuCompiler.__init__(self, GCC_STANDARD)
self.warn_args = {'1': ['-Wall', '-Winvalid-pch'],
'2': ['-Wall', '-Wextra', '-Winvalid-pch'],
'3' : ['-Wall', '-Wpedantic', '-Wextra', '-Winvalid-pch']}
@@ -2067,27 +2065,13 @@ class GnuObjCCompiler(ObjCCompiler):
self.base_options.append('b_lundef')
self.base_options.append('b_asneeded')
- def get_buildtype_args(self, buildtype):
- return gnulike_buildtype_args[buildtype]
-
- def get_buildtype_linker_args(self, buildtype):
- return gnulike_buildtype_linker_args[buildtype]
-
- def get_pch_suffix(self):
- return 'gch'
-
- def get_soname_args(self, shlib_name, path, soversion):
- return get_gcc_soname_args(self.gcc_type, shlib_name, path, soversion)
-
-class GnuObjCPPCompiler(ObjCPPCompiler):
- std_opt_args = ['-O2']
+class GnuObjCPPCompiler(GnuCompiler, ObjCPPCompiler):
def __init__(self, exelist, version, is_cross, exe_wrapper=None):
ObjCCompiler.__init__(self, exelist, version, is_cross, exe_wrapper)
- self.id = 'gcc'
# Not really correct, but GNU objc is only used on non-OSX non-win. File a bug
# if this breaks your use case.
- self.gcc_type = GCC_STANDARD
+ GnuCompiler.__init__(self, GCC_STANDARD)
self.warn_args = {'1': ['-Wall', '-Winvalid-pch', '-Wnon-virtual-dtor'],
'2': ['-Wall', '-Wextra', '-Winvalid-pch', '-Wnon-virtual-dtor'],
'3' : ['-Wall', '-Wpedantic', '-Wextra', '-Winvalid-pch', '-Wnon-virtual-dtor']}
@@ -2096,18 +2080,6 @@ class GnuObjCPPCompiler(ObjCPPCompiler):
self.base_options.append('b_lundef')
self.base_options.append('b_asneeded')
- def get_buildtype_args(self, buildtype):
- return gnulike_buildtype_args[buildtype]
-
- def get_buildtype_linker_args(self, buildtype):
- return gnulike_buildtype_linker_args[buildtype]
-
- def get_pch_suffix(self):
- return 'gch'
-
- def get_soname_args(self, shlib_name, path, soversion):
- return get_gcc_soname_args(self.gcc_type, shlib_name, path, soversion)
-
class ClangObjCCompiler(GnuObjCCompiler):
def __init__(self, exelist, version, cltype, is_cross, exe_wrapper=None):
super().__init__(exelist, version, is_cross, exe_wrapper)