aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/build.py
diff options
context:
space:
mode:
authorXavier Claessens <xavier.claessens@collabora.com>2019-09-28 17:24:46 -0400
committerXavier Claessens <xclaesse@gmail.com>2019-10-01 13:06:45 -0400
commitdd5a0df3ecde0383f667909e6db473b326804c00 (patch)
treefa15da005182dc4e93109c26bc8ea765d0a76d34 /mesonbuild/build.py
parenta3153747b97512b57309e493b8b6545994d0a106 (diff)
downloadmeson-dd5a0df3ecde0383f667909e6db473b326804c00.zip
meson-dd5a0df3ecde0383f667909e6db473b326804c00.tar.gz
meson-dd5a0df3ecde0383f667909e6db473b326804c00.tar.bz2
Recursively include all objects from uninstalled static libraries
Diffstat (limited to 'mesonbuild/build.py')
-rw-r--r--mesonbuild/build.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/mesonbuild/build.py b/mesonbuild/build.py
index 96bacaa..4ec742d 100644
--- a/mesonbuild/build.py
+++ b/mesonbuild/build.py
@@ -1110,9 +1110,16 @@ You probably should put it in link_with instead.''')
if isinstance(self, StaticLibrary):
# When we're a static library and we link_whole: to another static
# library, we need to add that target's objects to ourselves.
- self.objects.append(t.extract_all_objects())
+ self.objects += t.extract_all_objects_recurse()
self.link_whole_targets.append(t)
+ def extract_all_objects_recurse(self):
+ objs = [self.extract_all_objects()]
+ for t in self.link_targets:
+ if t.is_internal():
+ objs += t.extract_all_objects_recurse()
+ return objs
+
def add_pch(self, language, pchlist):
if not pchlist:
return