diff options
-rw-r--r-- | mesonbuild/backend/backends.py | 4 | ||||
-rw-r--r-- | mesonbuild/build.py | 2 |
2 files changed, 5 insertions, 1 deletions
diff --git a/mesonbuild/backend/backends.py b/mesonbuild/backend/backends.py index 682e83f..0ccb6cd 100644 --- a/mesonbuild/backend/backends.py +++ b/mesonbuild/backend/backends.py @@ -1299,6 +1299,10 @@ class Backend: elif isinstance(i, build.ExtractedObjects): outputs = i.get_outputs(self) fname = self.get_extracted_obj_paths(i.target, outputs) + elif isinstance(i, programs.ExternalProgram): + assert i.found(), "This shouldn't be possible" + assert i.path is not None, 'for mypy' + fname = [i.path] else: fname = [i.rel_to_builddir(self.build_to_src)] if target.absolute_paths: diff --git a/mesonbuild/build.py b/mesonbuild/build.py index 7b8966b..05a3cea 100644 --- a/mesonbuild/build.py +++ b/mesonbuild/build.py @@ -2529,7 +2529,7 @@ class CustomTarget(Target, CommandBase): def get_filename(self) -> str: return self.outputs[0] - def get_sources(self) -> T.List[T.Union[str, File, 'CustomTarget', 'CustomTargetIndex', 'GeneratedList', 'ExtractedObjects']]: + def get_sources(self) -> T.List[T.Union[str, File, BuildTarget, GeneratedTypes, ExtractedObjects, programs.ExternalProgram]]: return self.sources def get_generated_lists(self) -> T.List[GeneratedList]: |