aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild
diff options
context:
space:
mode:
authorXavier Claessens <xavier.claessens@collabora.com>2021-06-17 14:41:55 -0400
committerXavier Claessens <xclaesse@gmail.com>2021-06-18 12:47:41 -0400
commit5f3b73beb594b837e7b817b570c0a722c9cc2f63 (patch)
tree72714cbc8ad9c4562b85e695a8681c57a5a7165d /mesonbuild
parentd729ea3f6936dd7ea68a41cf178ee6a9afcf0ddd (diff)
downloadmeson-5f3b73beb594b837e7b817b570c0a722c9cc2f63.zip
meson-5f3b73beb594b837e7b817b570c0a722c9cc2f63.tar.gz
meson-5f3b73beb594b837e7b817b570c0a722c9cc2f63.tar.bz2
dependency: Empty fallback is the same as allow_fallback: false
Diffstat (limited to 'mesonbuild')
-rw-r--r--mesonbuild/interpreter/dependencyfallbacks.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/mesonbuild/interpreter/dependencyfallbacks.py b/mesonbuild/interpreter/dependencyfallbacks.py
index 6edb129..5b78d20 100644
--- a/mesonbuild/interpreter/dependencyfallbacks.py
+++ b/mesonbuild/interpreter/dependencyfallbacks.py
@@ -47,6 +47,10 @@ class DependencyFallbacksHolder(InterpreterObject):
location=self.interpreter.current_node)
return
fbinfo = stringlistify(fbinfo)
+ if len(fbinfo) == 0:
+ # dependency('foo', fallback: []) is the same as dependency('foo', allow_fallback: false)
+ self.allow_fallback = False
+ return
if len(fbinfo) == 1:
FeatureNew.single_use('Fallback without variable name', '0.53.0', self.subproject)
subp_name, varname = fbinfo[0], None