-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
dylib for target -musl #44991
Comments
Can you try passing |
Magic, thank you. But I thought |
There are still some rough edges with dynamic musl - it's essentially a tier 3 platform and there are possible issues with backwards compatibility (since it's historically unconditionally meant static linking). That said, I'd (cautiously) say that I see no reason why a dylib can't default to dynamic linking given it just errors out at the moment - we'd welcome a PR to start a discussion about it! |
For me, adding this to # Cargo.toml
[lib]
crate-type = ["dylib"] # .cargo/config
[target.x86_64-unknown-linux-musl]
rustflags = [
"-C", "target-feature=-crt-static",
] Then this worked cargo build --target=x86_64-unknown-linux-musl |
As it was said here #34987, we should have support for targets that use a dynamic musl (like alpine linux) in nightly rust.
I want to build .so file to use on Alpine (musl).
The text was updated successfully, but these errors were encountered: