Compiling a cdylib crate depending on some dylib crates does not reexport their symbols #128949
Labels
A-linkage
Area: linking into static, shared libraries and binaries
C-bug
Category: This is a bug.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
It seems somewhat like #50007 strikes again?
Reproduction:
I am trying to build a cdylib to link to C++ that uses other dylibs (since there are multiple C++ dylibs which each need a corresponding Rust cdylib to not break the C++ dependency hierarchy horribly). In doing this, it would be useful to be able to publicly export functions from the linked dylibs, which
pub use
is allegedly supposed to work for, but I am observing it not working.I tried this code:
meowcrab.rs
(dylib):crabmul.rs
(dylib):toplevel.rs
(cdylib):build.sh
:(note, this is very lightly edited from meson's generated build plan, you can probably delete like half the flags)
I expected to see this happen: I would expect to see the exported symbols exported from
libtoplevel.so
.Instead, this happened: The exported symbols are not re-exported from
libtoplevel.so
in spite of the fix to #50007 seemingly saying they are intended to be.Meta
rustc --version --verbose
:The text was updated successfully, but these errors were encountered: