aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--mesonbuild/build.py3
-rw-r--r--test cases/failing/127 subproject object as a dependency/test.json2
2 files changed, 4 insertions, 1 deletions
diff --git a/mesonbuild/build.py b/mesonbuild/build.py
index ea9b2c2..c987840 100644
--- a/mesonbuild/build.py
+++ b/mesonbuild/build.py
@@ -1373,6 +1373,9 @@ You probably should put it in link_with instead.''')
# This is a bit of a hack. We do not want Build to know anything
# about the interpreter so we can't import it and use isinstance.
# This should be reliable enough.
+ if hasattr(dep, 'held_object'):
+ # FIXME: subproject is not a real ObjectHolder so we have to do this by hand
+ dep = dep.held_object
if hasattr(dep, 'project_args_frozen') or hasattr(dep, 'global_args_frozen'):
raise InvalidArguments('Tried to use subproject object as a dependency.\n'
'You probably wanted to use a dependency declared in it instead.\n'
diff --git a/test cases/failing/127 subproject object as a dependency/test.json b/test cases/failing/127 subproject object as a dependency/test.json
index af7310f..fdc85b3 100644
--- a/test cases/failing/127 subproject object as a dependency/test.json
+++ b/test cases/failing/127 subproject object as a dependency/test.json
@@ -1,7 +1,7 @@
{
"stdout": [
{
- "line": "test cases/failing/127 subproject object as a dependency/meson.build:3:0: ERROR: Argument is of an unacceptable type 'SubprojectHolder'."
+ "line": "test cases/failing/127 subproject object as a dependency/meson.build:3:0: ERROR: Tried to use subproject object as a dependency."
}
]
}