aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/ast/introspection.py
diff options
context:
space:
mode:
authorDaniel Mensinger <daniel@mensinger-ka.de>2019-02-18 15:51:40 +0100
committerDaniel Mensinger <daniel@mensinger-ka.de>2019-03-03 23:19:03 +0100
commit8a1411a1e8a8a2c37de0d25ec129aba65703616e (patch)
tree177f00b186231bac4548d97ebf76e66e609603f6 /mesonbuild/ast/introspection.py
parent98e60f59acf9bf2c74bc38cb8d0285a5d76293a7 (diff)
downloadmeson-8a1411a1e8a8a2c37de0d25ec129aba65703616e.zip
meson-8a1411a1e8a8a2c37de0d25ec129aba65703616e.tar.gz
meson-8a1411a1e8a8a2c37de0d25ec129aba65703616e.tar.bz2
Target introspection from source
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,