-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
ninja: don't exclude rustc native-static-link args #14991
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
Signed-off-by: Marc-André Lureau <[email protected]>
`rustc --crate-type staticlib --print native-static-libs` doesn't print the default libraries being linked with rustc by default, at least not with rustc 1.89.0 (29483883e 2025-08-04). Stripping those by default, such as ws2_32 on win32, prevents from linking programs using sockets (ex qemu). Signed-off-by: Marc-André Lureau <[email protected]>
it's actually more subtle than that, it seems to be due to the order of arguments, but I don't yet have a good reproducer. @bonzini, you can easily reproduce with qemu --cross-prefix=x86_64-w64-mingw32- --enable-rust on fedora. |
That would make this patch correct. If a static library comes after the native libraries in the command line, it would not pick up the symbols even if it uses one of those libraries. |
Isn't that exactly why meson uses |
It doesn't use it (yet) for Rust (#14026). But it wouldn't solve the problem because rustc adds these libraries outside of the arguments coming from Meson, and therefore the libraries would be close to Rust's libstd and outside the group. |
Currently fails with meson issue: mesonbuild/meson#14991 Signed-off-by: Marc-André Lureau <[email protected]> Message-Id: <[email protected]>
Currently fails with meson issue: mesonbuild/meson#14991 Signed-off-by: Marc-André Lureau <[email protected]> Message-Id: <[email protected]>
Currently fails with meson issue: mesonbuild/meson#14991 Signed-off-by: Marc-André Lureau <[email protected]> Message-Id: <[email protected]>
Currently fails with meson issue: mesonbuild/meson#14991 Signed-off-by: Marc-André Lureau <[email protected]>
Currently fails with meson issue: mesonbuild/meson#14991 Signed-off-by: Marc-André Lureau <[email protected]> Message-Id: <[email protected]>
Currently fails with meson issue: mesonbuild/meson#14991 Signed-off-by: Marc-André Lureau <[email protected]> Message-Id: <[email protected]>
Currently fails with meson issue: mesonbuild/meson#14991 Signed-off-by: Marc-André Lureau <[email protected]> Message-Id: <[email protected]>
Currently fails with meson issue: mesonbuild/meson#14991 Signed-off-by: Marc-André Lureau <[email protected]> Message-Id: <[email protected]>
rustc --crate-type staticlib --print native-static-libs
doesn't printthe default libraries being linked with rustc by default, at least not
with rustc 1.89.0 (29483883e 2025-08-04).
Stripping those by default, such as ws2_32 on win32, prevents from
linking programs using sockets (ex qemu).
@bonzini @xclaesse