Skip to content
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

Set soname for cdylibs ( if major version is > 0) #333

Open
jschwe opened this issue Feb 21, 2023 · 1 comment
Open

Set soname for cdylibs ( if major version is > 0) #333

jschwe opened this issue Feb 21, 2023 · 1 comment

Comments

@jschwe
Copy link
Collaborator

jschwe commented Feb 21, 2023

Since this issue is probably not going to be addressed by cargo in the near future, we should set soname from the corrosion side.
This might require --crate-type support, so a rather recent rustc version could be needed. But since the linker is not invoked for staticlibs, maybe setting the soname could just be done in general for lib targets, that have a cdylib.

@jschwe
Copy link
Collaborator Author

jschwe commented Feb 26, 2023

-C link-arg=-Wl,-soname,libmycrate.so

Determining if -Wl, needs to be added may be difficult, since corrosion would need to know the linker driver.
This would have to work with both NO_LINKER_OVERRIDE (rust chooses the linker) and corrosion_set_linker (the user specifies the linker).

If the former option is specified, I don't think we can really do anything. For the latter, we could try to guess the linker flavor or ask the user to specify the linker flavor.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant