Uh oh!
There was an error while loading. Please reload this page.
[tasks] Add auto runtime initialization template to LibraryBuilder - #83050
Conversation
a4a9852 to
fd14133Comparefd14133 to
bef3de9CompareThis reverts commit bc86f2b.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
39b9c7a to
b46fdb3CompareUh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
0944eeb to
5761f4cComparemdh1418
commented
Mar 16, 2023
From the Build Analysis, looks like everything is a known test error. |
mdh1418
commented
Mar 17, 2023
All failures are known issues. |
Contributes to #79377
Incorporates mono's lazy runtime init capability #82253 into the library builder task #81919.
In the target use case of having a self-contained library containing the mono runtime with custom managed code, the mono runtime needs to be initialized when the library is loaded into the native application. In order to do so, one can either
A. leverage the default
runtime-init-callbackand upon loading the shared library, rely on the auto initialization logic inautoinit.c(Introduced by this PR) to setup the callback viamono_set_runtime_init_callback. The callback is set when first loading the shared library due to the constructor.or
B. pass in a custom
runtime-init-callback=introduced in #82253 and have one's own runtime initialization startup logic instead ofautoinit.c.The runtime initialization logic looked at https://github.com/dotnet/runtime/blob/main/src/tasks/AndroidAppBuilder/Templates/monodroid.c for inspiration.
In attempt to have a barebones version, the following is done:
DOTNET_ASSETS_PATHregister bundled modules// TODO when bundling is implementedDOTNET_ASSETS_PATHor custom defined variableadd a custom assembly preload hook// No longer needed as assembly paths are setallow for debugging//TODO in followupadd install hook for aot data// Not default scenarioExample generated files
CMakeLists
shared_library_log.h
autoinit.c
load_assemblies.c