Comment 9 for bug 2049904

Revision history for this message
Jussi Pakkanen (jpakkane) wrote : Re: proposed migration for meson 1.3.1-1

> it's rustc itself that emits `-lc` at the wrong location

Then this is a rustc bug and needs to be fixed there, not worked around after the fact by adding hacks on top of hacks on top of hacks.

In either case the patch you posted is incorrect. You don't need a dependency just to inject a link argument and in either case it should not go in the static library, because link arguments are never passed to it directly (as the static linker takes no arguments). A better way would be to create a dep that has the library and the corresponding flag, but even that is not really great. Doing it would mean that every single project that links C and Rust code together needs to copypaste the same workaround. This needs to be fixed properly once so that most developers won't even know that this is a thing that exists.