diff options
author | Eli Schwartz <eschwartz@archlinux.org> | 2022-10-31 23:11:25 -0400 |
---|---|---|
committer | Eli Schwartz <eschwartz@archlinux.org> | 2022-10-31 23:22:07 -0400 |
commit | 4533dfc279bc301b62dfee7c288aba5ecf0c036d (patch) | |
tree | 6c50381e6db2b64cfd05fce7545e87b7e341e65d | |
parent | 81763e610fac24c7a9720fa37630e7660111c4a6 (diff) | |
download | meson-4533dfc279bc301b62dfee7c288aba5ecf0c036d.zip meson-4533dfc279bc301b62dfee7c288aba5ecf0c036d.tar.gz meson-4533dfc279bc301b62dfee7c288aba5ecf0c036d.tar.bz2 |
Revert "build: don't add targets to link_whole_targets if we took their objects"
This reverts commit c94c492089e7fecb56b7cc11ea76712a770f1e34.
This broke propagated deps as well as PCH in MSVC, and has not been
fixed in time for the final release of 0.64.0, so it needs to be
reverted and then brought back later.
Fixes #10745
Fixes #10975
-rw-r--r-- | mesonbuild/build.py | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/mesonbuild/build.py b/mesonbuild/build.py index 4f9cf64..b779237 100644 --- a/mesonbuild/build.py +++ b/mesonbuild/build.py @@ -1403,13 +1403,11 @@ You probably should put it in link_with instead.''') raise InvalidArguments(msg + ' This is not possible in a cross build.') else: mlog.warning(msg + ' This will fail in cross build.') - # When we're a static library and we link_whole: to another static - # library, we need to add that target's objects to ourselves. - # Otherwise add it to the link_whole_targets, but not both. 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 += t.extract_all_objects_recurse() - else: - self.link_whole_targets.append(t) + self.link_whole_targets.append(t) def extract_all_objects_recurse(self) -> T.List[T.Union[str, 'ExtractedObjects']]: objs = [self.extract_all_objects()] |