diff options
author | Nirbheek Chauhan <nirbheek@centricular.com> | 2020-05-13 16:56:09 +0530 |
---|---|---|
committer | Nirbheek Chauhan <nirbheek.chauhan@gmail.com> | 2020-05-15 08:39:25 +0000 |
commit | b1e3440e596b632e09c48ef88ada6a5224628720 (patch) | |
tree | cde98632a7a1ca1cbb444d928b756352d2d8bb8a /mesonbuild/modules | |
parent | a25f0741e8ac663c8b3a6e33df8a0875dceab804 (diff) | |
download | meson-b1e3440e596b632e09c48ef88ada6a5224628720.zip meson-b1e3440e596b632e09c48ef88ada6a5224628720.tar.gz meson-b1e3440e596b632e09c48ef88ada6a5224628720.tar.bz2 |
ninjabackend: Treat GNOME gir/typelib as libraries
When classifying generated sources, we were treating gir/typelib files
generated by gobject-introspection as headers. This is bad because it
serializes the build by adding order-only dependencies to every target
even though sources will never actually use them for anything.
Treat them as libraries, which is somewhat more accurate.
Diffstat (limited to 'mesonbuild/modules')
-rw-r--r-- | mesonbuild/modules/__init__.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/mesonbuild/modules/__init__.py b/mesonbuild/modules/__init__.py index dc86a1b..47be039 100644 --- a/mesonbuild/modules/__init__.py +++ b/mesonbuild/modules/__init__.py @@ -57,6 +57,17 @@ def get_include_args(include_dirs, prefix='-I'): return dirs_str +def is_module_library(fname): + ''' + Check if the file is a library-like file generated by a module-specific + target, such as GirTarget or TypelibTarget + ''' + if hasattr(fname, 'fname'): + fname = fname.fname + suffix = fname.split('.')[-1] + return suffix in ('gir', 'typelib') + + class ModuleReturnValue: def __init__(self, return_value, new_objects): self.return_value = return_value |