From 4b90d162502d65f20a89331898cd8a0b3eea8fe2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ignacio=20Rold=C3=A1n=20Etcheverry?= Date: Sun, 27 Feb 2022 21:57:52 +0100 Subject: C#: Initial NativeAOT support This commit adds initial support for games exported as NativeAOT shared libraries. At this moment, the NativeAOT runtime is experimental. Additionally, Godot is not trim-safe as it still makes some use of reflection. For the time being, a rd.xml file is needed to prevent code triming: ``` ``` These are the csproj changes for publishing: ``` Shared ``` More info: - https://github.com/dotnet/runtimelab/blob/feature/NativeAOT/docs/using-nativeaot/compiling.md - https://github.com/dotnet/runtimelab/tree/feature/NativeAOT/samples/NativeLibrary - https://github.com/dotnet/runtimelab/blob/feature/NativeAOT/docs/using-nativeaot/rd-xml-format.md --- modules/mono/mono_gd/gd_mono.h | 1 + 1 file changed, 1 insertion(+) (limited to 'modules/mono/mono_gd/gd_mono.h') diff --git a/modules/mono/mono_gd/gd_mono.h b/modules/mono/mono_gd/gd_mono.h index 66ed331b67..301782575c 100644 --- a/modules/mono/mono_gd/gd_mono.h +++ b/modules/mono/mono_gd/gd_mono.h @@ -61,6 +61,7 @@ class GDMono { bool finalizing_scripts_domain; void *hostfxr_dll_handle = nullptr; + bool is_native_aot = false; #ifdef TOOLS_ENABLED bool _load_project_assembly(); -- cgit v1.2.3