-
-
Notifications
You must be signed in to change notification settings - Fork 32
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
don't assume musl target is always static #7
Comments
What are the cases in which one wants to dynamically link with musl? My guess is that this is possibly a red herring. I'm not sure if the Cargo toolchain itself supports dynamically linking with musl? A proof of concept of what you're asking for would help. |
it's true than rustup/upstream provided rust tarballs for musl target target static musl, but it's possible to build rust suite itself with some linux distros ship rust on musl build with another triple which also ends on I want to have ripgrep buildable on gentoo musl, it uses musl as system libc, completely replacing glibc.
here's an example of rust app.
I'm not asking to change default behaviour, just give us a knob to override an assumption that if target contains musl it's static. some links and here's the PR that enabled overriding static linking in rust on musl |
All set. If you explicitly set |
I would like to gently ask if the default could be changed, there's quite a few musl repo's e.g. alpine, void, chimera. and making the assumption that musl == static seems weird If that isn't possible could this functionality at least be documented to the README or somewhere in the docs? |
@the-eater You've got it backwards. The intent isn't, "when we use musl we should statically link." The intent is, "if the user wants a fully static executable, then we'll use musl to achieve that end." With that said, there is indeed an assumption that if the caller requests musl, then they get a static build. This is somewhat of a convention in the Rust ecosystem. I'm happy to try something different, but it would greatly help matters if you could point to more established projects in the Rust ecosystem that handle musl in a way that makes you happy. Adding notes to the README is fine, although they might belong in the |
Hi,
build currently assumes that we want static linking if we are building for musl.
rust-pcre2/pcre2-sys/build.rs
Lines 67 to 68 in 09a7b7e
it's not always desired.
is it possible to provide some kind of override so we can skip static linking on musl targets on demand?
The text was updated successfully, but these errors were encountered: