diff options
author | Eli Schwartz <eschwartz@archlinux.org> | 2021-11-21 16:31:36 -0500 |
---|---|---|
committer | Eli Schwartz <eschwartz@archlinux.org> | 2021-11-28 11:52:36 -0500 |
commit | bea735dd76db32f6ea34ab66fee496d4be2f7eb1 (patch) | |
tree | 8ea80300099c25584d0893a6477064db55f33df1 /mesonbuild/interpreter | |
parent | 69fa37e9ca885f55c92670bb228213db1b4ebbd8 (diff) | |
download | meson-bea735dd76db32f6ea34ab66fee496d4be2f7eb1.zip meson-bea735dd76db32f6ea34ab66fee496d4be2f7eb1.tar.gz meson-bea735dd76db32f6ea34ab66fee496d4be2f7eb1.tar.bz2 |
make sure files arguments to compiler.compiles and friends, performs rebuild
If the compiler check is updated as a string in meson.build, we force
rebuild, which is a good thing since the outcome of that check changes
the configuration context and can enable or disable parts of the build.
If the compiler check came from a files() object then we didn't add a
regen rule on those files.
Fixes #1656
Diffstat (limited to 'mesonbuild/interpreter')
-rw-r--r-- | mesonbuild/interpreter/compiler.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/mesonbuild/interpreter/compiler.py b/mesonbuild/interpreter/compiler.py index 49ca541..b46f1fe 100644 --- a/mesonbuild/interpreter/compiler.py +++ b/mesonbuild/interpreter/compiler.py @@ -275,6 +275,7 @@ class CompilerHolder(ObjectHolder['Compiler']): def run_method(self, args: T.Tuple['mesonlib.FileOrString'], kwargs: 'CompileKW') -> 'RunResult': code = args[0] if isinstance(code, mesonlib.File): + self.interpreter.add_build_def_file(code) code = mesonlib.File.from_absolute_file( code.rel_to_builddir(self.environment.source_dir)) testname = kwargs['name'] @@ -434,6 +435,7 @@ class CompilerHolder(ObjectHolder['Compiler']): def compiles_method(self, args: T.Tuple['mesonlib.FileOrString'], kwargs: 'CompileKW') -> bool: code = args[0] if isinstance(code, mesonlib.File): + self.interpreter.add_build_def_file(code) code = mesonlib.File.from_absolute_file( code.rel_to_builddir(self.environment.source_dir)) testname = kwargs['name'] @@ -457,6 +459,7 @@ class CompilerHolder(ObjectHolder['Compiler']): code = args[0] compiler = None if isinstance(code, mesonlib.File): + self.interpreter.add_build_def_file(code) code = mesonlib.File.from_absolute_file( code.rel_to_builddir(self.environment.source_dir)) suffix = code.suffix |