Skip to content

Commit

Permalink
Rust: Allow Rust static libraries to link_whole other libraries
Browse files Browse the repository at this point in the history
Rustc can do it without needing Meson to extract all objects.
  • Loading branch information
xclaesse committed Apr 27, 2023
1 parent c04d228 commit 2cb836f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mesonbuild/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -1428,7 +1428,7 @@ def link_whole(self, targets):
raise InvalidArguments(msg + ' This is not possible in a cross build.')
else:
mlog.warning(msg + ' This will fail in cross build.')
if isinstance(self, StaticLibrary):
if isinstance(self, StaticLibrary) and not self.uses_rust():
if isinstance(t, (CustomTarget, CustomTargetIndex)) or t.uses_rust():
# There are cases we cannot do this, however. In Rust, for
# example, this can't be done with Rust ABI libraries, though
Expand Down

0 comments on commit 2cb836f

Please sign in to comment.