-
Notifications
You must be signed in to change notification settings - Fork 4.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
Remove runtime dependencies on libstdc++ #76655
Comments
This removes the dependency from linux (clang, gcc) and osx (clang) main...am11:runtime:feature/nativeaot/nostdlib++. I haven't tested on windows, but I am sure its support needs work. |
Neat! Thank you for looking into it! Could you please submit it as a pull request? We probably don't need to worry about Windows - Windows doesn't distinguish between C and C++ runtime support - it's all in a single library that is present on all OSes. It's most interesting on Linux because the most minimal distros only come with a libc and C++ is an extra dependency one needs to install (as demonstrated here: https://github.com/eerhardt/Albums/blob/104ae182f72dccf522092ec33a340b8eb02529b7/AlbumsNetCore/Dockerfile#L2). |
Is it possible to only depend on UCRT on Windows? |
Would this remove the libc++_shared.so library dependency on Android? |
We are statically linking the tiny bit of C++ runtime that we need on Windows already. We do not depend on any C++ runtime .dll on Windows. |
I actually talk about coreclr. @MichalStrehovsky made a branch to allow build it using the NDK. Currently for some reason the upgrade of that branch is broken but it was usefull in order to create JNI libraries with pure C#. |
Transferred from dotnet/corert#3564.
NativeAOT runtime does not use any C++ features (exception handling, etc.), but it still depends on libstdc++ here and there for no good reason. Consider cleaning these up and remove dependency on libstdc++ to improve minimal footprint.
The text was updated successfully, but these errors were encountered: