-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Remove libstdc++ dependency from NativeAOT #76705
Conversation
nice, I'm just curious - does it lead to a smaller binary size? |
I don't know about the binary size (I haven't tested it), but it leads to a smaller container size because you don't need to install libstdc++ as a dependency. Here's the "docker inspect" of a small example NativeAOT app built on alpine: Note that the libstdc++ dependency almost doubles the starting image size. |
src/coreclr/nativeaot/BuildIntegration/Microsoft.NETCore.Native.Unix.targets
Show resolved
Hide resolved
Yes and no.
If we convert it to pure C, then it will get slimmer on both. Right now, compiler is baking in some code in |
19bd9ac
to
5a30a0d
Compare
src/coreclr/nativeaot/BuildIntegration/Microsoft.NETCore.Native.Unix.targets
Outdated
Show resolved
Hide resolved
4a730cb
to
cd2825c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great to me!
@AaronRobinsonMSFT Any other feedback?
cc @dotnet/gc for awareness. This contains some minor changes in GC/EE interface contract. These changes do not break binary compatibility - newer standalone gc builds should continue to work with older runtimes, just like before.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thx!
Failure is dotnet/arcade#11239 |
@EgorBo, crossgen2 binary size with final changes: macOS (arm64): +272 bytes |
Fixes #76655.