diff options
| author | Alyssa Ross <hi@alyssa.is> | 2025-11-05 16:53:28 +0100 |
|---|---|---|
| committer | Dylan Baker <dylan@pnwbakers.com> | 2025-11-19 09:14:05 -0800 |
| commit | a01cedecc4fed77f468ee15d272f06c918f119e5 (patch) | |
| tree | ac84a9f31aa2fd787fe4977407ace2ed3ad86dd3 /unittests | |
| parent | 665bf31e0b1c8905f107cb085e179dd8d8b82302 (diff) | |
| download | meson-a01cedecc4fed77f468ee15d272f06c918f119e5.tar.gz | |
rust: search for native static libs in target libdir
Sometimes, a Rust static library's native static libs refer to
libraries installed in the rustc target libdir. This is always the
case for most musl targets (with the intention of making it easier to
use them on non-musl systems), and other targets can also be
configured to do this using e.g. the llvm-libunwind option when
building the standard libraries for the target. When rustc is
responsible for linking it will always add the appropriate directory
to the linker search path, but if we're not using Rust for linking, we
have to tell the linker about that directory ourselves.
The added test demonstrates a scenario where this comes up: linking a
static Rust library, built for musl, into a C executable. -lunwind is
in the native static libs list from the compiler, but it's referring
to the libunwind.a in the self-contained directory.
Diffstat (limited to 'unittests')
0 files changed, 0 insertions, 0 deletions
