diff options
author | Xavier Claessens <xavier.claessens@collabora.com> | 2021-06-17 14:41:55 -0400 |
---|---|---|
committer | Xavier Claessens <xclaesse@gmail.com> | 2021-06-18 12:47:41 -0400 |
commit | 5f3b73beb594b837e7b817b570c0a722c9cc2f63 (patch) | |
tree | 72714cbc8ad9c4562b85e695a8681c57a5a7165d /mesonbuild | |
parent | d729ea3f6936dd7ea68a41cf178ee6a9afcf0ddd (diff) | |
download | meson-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.py | 4 |
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 |