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.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/mesonbuild/ast/introspection.py b/mesonbuild/ast/introspection.py
index 12cb379..5745d29 100644
--- a/mesonbuild/ast/introspection.py
+++ b/mesonbuild/ast/introspection.py
@@ -194,7 +194,7 @@ class IntrospectionInterpreter(AstInterpreter):
empty_sources = [] # Passing the unresolved sources list causes errors
target = targetclass(name, self.subdir, self.subproject, is_cross, empty_sources, objects, self.environment, kwargs_reduced)
- self.targets += [{
+ new_target = {
'name': target.get_basename(),
'id': target.get_id(),
'type': target.get_typename(),
@@ -206,9 +206,10 @@ class IntrospectionInterpreter(AstInterpreter):
'sources': source_nodes,
'kwargs': kwargs,
'node': node,
- }]
+ }
- return
+ self.targets += [new_target]
+ return new_target
def build_library(self, node, args, kwargs):
default_library = self.coredata.get_builtin_option('default_library')