diff options
author | Marvin Scholz <epirat07@gmail.com> | 2019-06-13 00:05:19 +0200 |
---|---|---|
committer | Jussi Pakkanen <jpakkane@gmail.com> | 2019-07-05 22:27:10 +0300 |
commit | 976c30360370354cdfd3222e6fb9e2e595b2a4c8 (patch) | |
tree | 2d9a1f7044b47720e4cb5ca2b091606553496625 /mesonbuild | |
parent | b347f00dc0a921f99ade780223a2fd3a18431cc6 (diff) | |
download | meson-976c30360370354cdfd3222e6fb9e2e595b2a4c8.zip meson-976c30360370354cdfd3222e6fb9e2e595b2a4c8.tar.gz meson-976c30360370354cdfd3222e6fb9e2e595b2a4c8.tar.bz2 |
compilers: Fix missing cflags for function detection
Fix #5481
Diffstat (limited to 'mesonbuild')
-rw-r--r-- | mesonbuild/compilers/clike.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/mesonbuild/compilers/clike.py b/mesonbuild/compilers/clike.py index cebbffa..49fb846 100644 --- a/mesonbuild/compilers/clike.py +++ b/mesonbuild/compilers/clike.py @@ -431,11 +431,11 @@ class CLikeCompiler: with self._build_wrapper(code, env, extra_args, dependencies, mode, disable_cache=disable_cache) as p: return p.returncode == 0, p.cached - def _build_wrapper(self, code, env, extra_args, dependencies=None, mode='compile', want_output=False, disable_cache=False): + def _build_wrapper(self, code, env, extra_args, dependencies=None, mode='compile', want_output=False, disable_cache=False, temp_dir=None): args = self._get_compiler_check_args(env, extra_args, dependencies, mode) if disable_cache or want_output: - return self.compile(code, extra_args=args, mode=mode, want_output=want_output, temp_dir=env.scratch_dir) - return self.cached_compile(code, env.coredata, extra_args=args, mode=mode, temp_dir=env.scratch_dir) + return self.compile(code, extra_args=args, mode=mode, want_output=want_output, temp_dir=temp_dir) + return self.cached_compile(code, env.coredata, extra_args=args, mode=mode, temp_dir=temp_dir) def links(self, code, env, *, extra_args=None, dependencies=None, disable_cache=False): return self.compiles(code, env, extra_args=extra_args, @@ -861,7 +861,7 @@ class CLikeCompiler: ''' args = self.get_compiler_check_args() n = 'symbols_have_underscore_prefix' - with self.compile(code, extra_args=args, mode='compile', want_output=True, temp_dir=env.scratch_dir) as p: + with self._build_wrapper(code, env, extra_args=args, mode='compile', want_output=True, temp_dir=env.scratch_dir) as p: if p.returncode != 0: m = 'BUG: Unable to compile {!r} check: {}' raise RuntimeError(m.format(n, p.stdo)) |