Skip to content
This repository has been archived by the owner on Jan 23, 2023. It is now read-only.

Proposal: Publish nethost static library #8659

Closed
wants to merge 2 commits into from
Closed

Proposal: Publish nethost static library #8659

wants to merge 2 commits into from

Conversation

nxtn
Copy link

@nxtn nxtn commented Oct 24, 2019

See discussion in #7114

Using "s" suffix as a temporary workaround to distinguish between static/import libraries.

@nxtn nxtn closed this Oct 24, 2019
@nxtn nxtn reopened this Oct 24, 2019
@dagood
Copy link
Member

dagood commented Oct 24, 2019

The packaging infra work looks good, nice. I'm not familiar with the consequences of shipping this, e.g. signing, delivering both the dynamic nethost.lib and static nethosts.lib on Windows (at least that's what this appears to be?), and the best way to resolve naming issues to get rid of the temp s suffix.

@vitek-karas @elinor-fung

@vitek-karas
Copy link
Member

I looked at what we do for other libraries. For example CRT prepends lib to for the static ones: https://docs.microsoft.com/en-us/cpp/c-runtime-library/crt-library-features?view=vs-2019

So in that case it would be nethost.lib for the dynamic one and libnethost.lib for the static one on Windows. For Linux/Max I think it would be good to be consistent, so libnethost.a there as well - but I don't know how other products handle this - @lpereira may know.

In any case it's an explicit action to use this in a build, so people can pick one easily and there should be no naming issues I'm aware of.

As for the signing: I don't know what our policies are shipping unsigned code, but since it is not an executable itself, I think it should be fine. @GrabYourPitchforks would know for sure I think.

/cc @jeffschwMSFT @swaroop-sridhar

@nxtn
Copy link
Author

nxtn commented Oct 28, 2019

The lib prefix looks good to me.

@lpereira
Copy link

lpereira commented Oct 28, 2019

On Unix, libraries are usually always prefixed with "lib" and postfixed with something like ".so" (ELF systems) or ".dylib" (Mach-O systems) or ".a" (in case of static libraries). Which one gets picked depends on how the compiler driver is instructed to call the linker (with e.g. the -static parameter in GCC and Clang).

In other words, I find it kind of confusing to have the static library having the prefix and the shared library without it: to link with the static library, you'd pass -lnethost (with potentially a -L somewhere), but to link with the shared library, you'd need to pass the path to the shared library instead.

@vitek-karas
Copy link
Member

@lpereira On Linux/Mac the shared library does have the prefix - it should be (already) called:

  • libnethost.so
  • libnethost.dylib

Now we would be basically adding libnethost.a as well.

@vitek-karas vitek-karas added the post-consolidation PRs which will be hand ported to dotnet/runtime label Nov 7, 2019
@ViktorHofer ViktorHofer added the * NO MERGE * The PR is not ready for merge yet (see discussion for detailed reasons) label Nov 14, 2019
@nxtn nxtn closed this Nov 26, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-Host * NO MERGE * The PR is not ready for merge yet (see discussion for detailed reasons) post-consolidation PRs which will be hand ported to dotnet/runtime
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants