diff options
Diffstat (limited to 'mesonbuild/build.py')
| -rw-r--r-- | mesonbuild/build.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/mesonbuild/build.py b/mesonbuild/build.py index c0174253a..27c17da94 100644 --- a/mesonbuild/build.py +++ b/mesonbuild/build.py @@ -743,11 +743,12 @@ class BuildTarget(Target): # 2. Compiled objects created by and extracted from another target self.process_objectlist(objects) self.process_kwargs(kwargs) - self.check_unknown_kwargs(kwargs) - if not any([self.sources, self.generated, self.objects, self.link_whole_targets, self.structured_sources]): + if not any([self.sources, self.generated, self.objects, self.link_whole_targets, self.structured_sources, + kwargs.pop('_allow_no_sources', False)]): mlog.warning(f'Build target {name} has no sources. ' 'This was never supposed to be allowed but did because of a bug, ' 'support will be removed in a future release of Meson') + self.check_unknown_kwargs(kwargs) self.validate_install() self.check_module_linking() |
