diff options
author | Daniel Mensinger <daniel@mensinger-ka.de> | 2019-03-03 23:43:54 +0100 |
---|---|---|
committer | Daniel Mensinger <daniel@mensinger-ka.de> | 2019-04-28 14:33:22 +0200 |
commit | 8a32fc8dbeb6d0fb5666f2af694d70fa6b575e03 (patch) | |
tree | 7ba9f0d312555c1063292a7fad5752b1d29acc2d /mesonbuild/compilers | |
parent | 47c06a787504dd9635a0bd5a9e2013aa4bf85b12 (diff) | |
download | meson-8a32fc8dbeb6d0fb5666f2af694d70fa6b575e03.zip meson-8a32fc8dbeb6d0fb5666f2af694d70fa6b575e03.tar.gz meson-8a32fc8dbeb6d0fb5666f2af694d70fa6b575e03.tar.bz2 |
Disable cache for dependencies
Diffstat (limited to 'mesonbuild/compilers')
-rw-r--r-- | mesonbuild/compilers/c.py | 8 | ||||
-rw-r--r-- | mesonbuild/compilers/fortran.py | 8 |
2 files changed, 8 insertions, 8 deletions
diff --git a/mesonbuild/compilers/c.py b/mesonbuild/compilers/c.py index 2e796ae..e1001e7 100644 --- a/mesonbuild/compilers/c.py +++ b/mesonbuild/compilers/c.py @@ -368,7 +368,7 @@ class CCompiler(Compiler): return self.compiles(code.format(**fargs), env, extra_args=extra_args, dependencies=dependencies) - def has_header(self, hname, prefix, env, *, extra_args=None, dependencies=None): + def has_header(self, hname, prefix, env, *, extra_args=None, dependencies=None, disable_cache=False): fargs = {'prefix': prefix, 'header': hname} code = '''{prefix} #ifdef __has_include @@ -379,7 +379,7 @@ class CCompiler(Compiler): #include <{header}> #endif''' return self.compiles(code.format(**fargs), env, extra_args=extra_args, - dependencies=dependencies, mode='preprocess') + dependencies=dependencies, mode='preprocess', disable_cache=disable_cache) def has_header_symbol(self, hname, symbol, prefix, env, *, extra_args=None, dependencies=None): fargs = {'prefix': prefix, 'header': hname, 'symbol': symbol} @@ -641,7 +641,7 @@ class CCompiler(Compiler): raise EnvironmentException('Could not determine alignment of %s. Sorry. You might want to file a bug.' % typename) return align - def get_define(self, dname, prefix, env, extra_args, dependencies): + def get_define(self, dname, prefix, env, extra_args, dependencies, disable_cache=False): delim = '"MESON_GET_DEFINE_DELIMITER"' fargs = {'prefix': prefix, 'define': dname, 'delim': delim} code = ''' @@ -652,7 +652,7 @@ class CCompiler(Compiler): {delim}\n{define}''' args = self._get_compiler_check_args(env, extra_args, dependencies, mode='preprocess').to_native() - with self.compile(code.format(**fargs), args, 'preprocess', cdata=env.coredata) as p: + with self.compile(code.format(**fargs), args, 'preprocess', cdata=env.coredata if not disable_cache else None) as p: cached = p.cached if p.returncode != 0: raise EnvironmentException('Could not get define {!r}'.format(dname)) diff --git a/mesonbuild/compilers/fortran.py b/mesonbuild/compilers/fortran.py index 7e27f1a..acfb506 100644 --- a/mesonbuild/compilers/fortran.py +++ b/mesonbuild/compilers/fortran.py @@ -297,11 +297,11 @@ class FortranCompiler(Compiler): def has_multi_arguments(self, args, env): return CCompiler.has_multi_arguments(self, args, env) - def has_header(self, hname, prefix, env, *, extra_args=None, dependencies=None): - return CCompiler.has_header(self, hname, prefix, env, extra_args=extra_args, dependencies=dependencies) + def has_header(self, hname, prefix, env, *, extra_args=None, dependencies=None, disable_cache=False): + return CCompiler.has_header(self, hname, prefix, env, extra_args=extra_args, dependencies=dependencies, disable_cache=disable_cache) - def get_define(self, dname, prefix, env, extra_args, dependencies): - return CCompiler.get_define(self, dname, prefix, env, extra_args, dependencies) + def get_define(self, dname, prefix, env, extra_args, dependencies, disable_cache=False): + return CCompiler.get_define(self, dname, prefix, env, extra_args, dependencies, disable_cache=disable_cache) @classmethod def _get_trials_from_pattern(cls, pattern, directory, libname): |