In use cases where rust code is used to build a static library
[lib]
crate-type = ["staticlib"]
which is then integrated into a bigger shared library that includes some C/C++ code as well, and both the rust and the C/C++ parts depend on a common static library, the only possible way to make the build process work without the linker complaining about duplicate symbols is to compile and link the rust static library with the
makes rustc include symbols coming from <common-static-lib> which will then conflict during the final linking process of C/C++/Rust shared library.
The temporary solution for such cases is to do an intermediate step to strip away symbols belonging to <common-static-lib> from the rust static library.
Would it be possible to somehow include the static-nobundle option in pkg-config ?
In use cases where rust code is used to build a static library
which is then integrated into a bigger shared library that includes some C/C++ code as well, and both the rust and the C/C++ parts depend on a common static library, the only possible way to make the build process work without the linker complaining about duplicate symbols is to compile and link the rust static library with the
option, briefly described in here
Going with the classic
makes rustc include symbols coming from
<common-static-lib>
which will then conflict during the final linking process of C/C++/Rust shared library. The temporary solution for such cases is to do an intermediate step to strip away symbols belonging to<common-static-lib>
from the rust static library.Would it be possible to somehow include the
static-nobundle
option inpkg-config
?