-
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
[NativeAOT] Optionally compile unmanaged runtime at application build time #83611
Comments
Tagging subscribers to this area: @agocke, @MichalStrehovsky, @jkotas Issue DetailsNative AOT compiler package includes precompiled libraries (.lib/.a files) with unmanaged runtime code. This works well in most cases. However, we have
|
One issue with this I guess is that it'd introduce a dependency on Clang on Linux systems, since GCC is not officially supported. |
Yes, it would have almost the same pre-reqs as dotnet/runtime repo build: https://github.com/dotnet/runtime/blob/main/docs/workflow/requirements/linux-requirements.md#toolchain-setup (with a few exceptions - curl, git, lldb and ninja should not be necessary). |
From #102586 (comment) (@jkoritzinsky) For this scenario, we should produce simple and straightforward CMake files that have the minimal information required to define the CMake targets necessary to build the libraries. Right now we have a decent amount of logic that's shared with the rest of the runtime repo (functions, shared definitions), and I don't think we want to ship our eng/native directory. |
From #102586 (comment) (@MichalStrehovsky) I've looked at this in the past, and yeah, the shared CMake files don't make it easy to disconnect from our engineering system. But if we don't use the same files that we use to build the product, it's super easy to forget switches/ifdefs and end up with a different runtime, that could be different in very subtle ways. It also doesn't help that CoreLib relies on files we generate as part of native build and who knows if they could be different. |
In addition to defining the CMake targets necessary to build the libraries, it would be great to go the other way as well and somehow generate MSBuild .props or .targets from the user's CMake configuration. This would ensure that the same linker options are used for both linking the native library and then statically linking it with Native AOT. That is, all of the linker flags my native library uses (whether defined by This technique was suggested to me in #108009 (comment) and it works well - the only problem is that there is nothing to enforce consistency between the linker flags in my |
Native AOT compiler package includes precompiled libraries (.lib/.a files) with unmanaged runtime code. This works well in most cases. However, we have seen situations where the precompiled libraries are not usable:
We have introduced options to compile OpenSSL shims and ICU shims at application build time. This issue is about extending this approach to all native AOT unmanaged runtime code.
The text was updated successfully, but these errors were encountered: