aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJussi Pakkanen <jpakkane@gmail.com>2015-07-23 20:39:20 +0300
committerJussi Pakkanen <jpakkane@gmail.com>2015-07-23 20:39:20 +0300
commitcbc37237974d3b9de31acca91fa9207f462c9b4d (patch)
tree73b4e986c3dcb3a00744f9d3e961d5a015b737a7
parentd81526a7c4f644e6debb61e46fce292734e0b495 (diff)
downloadmeson-cbc37237974d3b9de31acca91fa9207f462c9b4d.zip
meson-cbc37237974d3b9de31acca91fa9207f462c9b4d.tar.gz
meson-cbc37237974d3b9de31acca91fa9207f462c9b4d.tar.bz2
Store warning flags in object instead of class because it does not seem to unpickle cleanly on some platforms. Closes #209.
-rw-r--r--compilers.py14
1 files changed, 6 insertions, 8 deletions
diff --git a/compilers.py b/compilers.py
index 40fe6d5..23c260f 100644
--- a/compilers.py
+++ b/compilers.py
@@ -1037,7 +1037,6 @@ def get_gcc_soname_args(gcc_type, shlib_name, path, soversion):
raise RuntimeError('Not implemented yet.')
class GnuCCompiler(CCompiler):
- std_warn_args = []
old_warn = ['-Wall', '-pedantic', '-Winvalid-pch']
new_warn = ['-Wall', '-Wpedantic', '-Winvalid-pch']
@@ -1046,15 +1045,15 @@ class GnuCCompiler(CCompiler):
self.id = 'gcc'
self.gcc_type = gcc_type
if mesonlib.version_compare(version, ">=4.9.0"):
- GnuCCompiler.std_warn_args= GnuCCompiler.new_warn
+ self.warn_args= GnuCCompiler.new_warn
else:
- GnuCCompiler.std_warn_args = GnuCCompiler.old_warn
+ self.warn_args = GnuCCompiler.old_warn
def get_always_args(self):
return ['-pipe']
def get_std_warn_args(self):
- return GnuCCompiler.std_warn_args
+ return self.warn_args
def get_buildtype_args(self, buildtype):
return gnulike_buildtype_args[buildtype]
@@ -1165,7 +1164,6 @@ class ClangCCompiler(CCompiler):
class GnuCPPCompiler(CPPCompiler):
- std_warn_args = []
new_warn = ['-Wall', '-Wpedantic', '-Winvalid-pch', '-Wnon-virtual-dtor']
old_warn = ['-Wall', '-pedantic', '-Winvalid-pch', '-Wnon-virtual-dtor']
# may need to separate the latter to extra_debug_args or something
@@ -1176,15 +1174,15 @@ class GnuCPPCompiler(CPPCompiler):
self.id = 'gcc'
self.gcc_type = gcc_type
if mesonlib.version_compare(version, ">=4.9.0"):
- GnuCPPCompiler.std_warn_args= GnuCPPCompiler.new_warn
+ self.warn_args= GnuCPPCompiler.new_warn
else:
- GnuCPPCompiler.std_warn_args = GnuCPPCompiler.old_warn
+ self.warn_args = GnuCPPCompiler.old_warn
def get_always_args(self):
return ['-pipe']
def get_std_warn_args(self):
- return GnuCPPCompiler.std_warn_args
+ return self.warn_args
def get_buildtype_args(self, buildtype):
return gnulike_buildtype_args[buildtype]