diff options
author | Dylan Baker <dylan@pnwbakers.com> | 2017-05-09 13:31:16 -0700 |
---|---|---|
committer | Dylan Baker <dylan@pnwbakers.com> | 2017-05-11 09:57:38 -0700 |
commit | e2567386f108c17704a9b300f56c0f2f2c0b4b54 (patch) | |
tree | 432bbb680898de38d932ba8d405e127b918f11f9 /mesonbuild/build.py | |
parent | e419198ff879f74663a7c4d71f2a24f125d27de1 (diff) | |
download | meson-e2567386f108c17704a9b300f56c0f2f2c0b4b54.zip meson-e2567386f108c17704a9b300f56c0f2f2c0b4b54.tar.gz meson-e2567386f108c17704a9b300f56c0f2f2c0b4b54.tar.bz2 |
Use flatten for link targets. Fixes #1764
Diffstat (limited to 'mesonbuild/build.py')
-rw-r--r-- | mesonbuild/build.py | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/mesonbuild/build.py b/mesonbuild/build.py index 0d58394..41fd8c1 100644 --- a/mesonbuild/build.py +++ b/mesonbuild/build.py @@ -813,9 +813,7 @@ You probably should put it in link_with instead.''') return self.external_deps def link(self, target): - if not isinstance(target, list): - target = [target] - for t in target: + for t in flatten(target): if hasattr(t, 'held_object'): t = t.held_object if not isinstance(t, (StaticLibrary, SharedLibrary)): @@ -829,9 +827,7 @@ You probably should put it in link_with instead.''') self.link_targets.append(t) def link_whole(self, target): - if not isinstance(target, list): - target = [target] - for t in target: + for t in flatten(target): if hasattr(t, 'held_object'): t = t.held_object if not isinstance(t, StaticLibrary): |