aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/ast/introspection.py
diff options
context:
space:
mode:
Diffstat (limited to 'mesonbuild/ast/introspection.py')
-rw-r--r--mesonbuild/ast/introspection.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/mesonbuild/ast/introspection.py b/mesonbuild/ast/introspection.py
index 6ac5929..da2f740 100644
--- a/mesonbuild/ast/introspection.py
+++ b/mesonbuild/ast/introspection.py
@@ -180,11 +180,11 @@ class IntrospectionInterpreter(AstInterpreter):
source_nodes += [curr]
# Make sure nothing can crash when creating the build class
- kwargs = {}
+ kwargs_reduced = {k: v for k, v in kwargs.items() if k in targetclass.known_kwargs and k in ['install', 'build_by_default', 'build_always']}
is_cross = False
objects = []
empty_sources = [] # Passing the unresolved sources list causes errors
- target = targetclass(name, self.subdir, self.subproject, is_cross, empty_sources, objects, self.environment, kwargs)
+ target = targetclass(name, self.subdir, self.subproject, is_cross, empty_sources, objects, self.environment, kwargs_reduced)
self.targets += [{
'name': target.get_basename(),
@@ -193,6 +193,8 @@ class IntrospectionInterpreter(AstInterpreter):
'defined_in': os.path.normpath(os.path.join(self.source_root, self.subdir, environment.build_filename)),
'subdir': self.subdir,
'build_by_default': target.build_by_default,
+ 'installed': target.should_install(),
+ 'outputs': target.get_outputs(),
'sources': source_nodes,
'kwargs': kwargs,
'node': node,