diff options
author | TheQwertiest <qwertiest@mail.ru> | 2019-03-27 19:18:39 +0300 |
---|---|---|
committer | TheQwertiest <qwertiest@mail.ru> | 2019-04-29 16:07:50 +0300 |
commit | 8c9a25456d7605bdd8a71c9d7cf1cd71fe308587 (patch) | |
tree | 83091566b34f772d42f58b8afbd29670a0cc8255 /mesonbuild/backend/backends.py | |
parent | ccc4ce28cc9077d77a0bc9e72b1177eba1be7186 (diff) | |
download | meson-8c9a25456d7605bdd8a71c9d7cf1cd71fe308587.zip meson-8c9a25456d7605bdd8a71c9d7cf1cd71fe308587.tar.gz meson-8c9a25456d7605bdd8a71c9d7cf1cd71fe308587.tar.bz2 |
Added custom_target[i] support for link_with and link_whole
Diffstat (limited to 'mesonbuild/backend/backends.py')
-rw-r--r-- | mesonbuild/backend/backends.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/mesonbuild/backend/backends.py b/mesonbuild/backend/backends.py index 4a4f7f4..072c7fb 100644 --- a/mesonbuild/backend/backends.py +++ b/mesonbuild/backend/backends.py @@ -171,6 +171,8 @@ class Backend: mlog.warning('custom_target {!r} has more than one output! ' 'Using the first one.'.format(t.name)) filename = t.get_outputs()[0] + elif isinstance(t, build.CustomTargetIndex): + filename = t.get_outputs()[0] else: assert(isinstance(t, build.BuildTarget)) filename = t.get_filename() @@ -214,7 +216,7 @@ class Backend: return os.path.join(self.get_target_dir(target), link_lib) elif isinstance(target, build.StaticLibrary): return os.path.join(self.get_target_dir(target), target.get_filename()) - elif isinstance(target, build.CustomTarget): + elif isinstance(target, build.CustomTarget) or isinstance(target, build.CustomTargetIndex): if not target.is_linkable_target(): raise MesonException('Tried to link against custom target "%s", which is not linkable.' % target.name) return os.path.join(self.get_target_dir(target), target.get_filename()) |