Uh oh!
There was an error while loading. Please reload this page.
[mono] Make some API functions public and private - #33736
Conversation
EgorBo
commented
Mar 18, 2020
heh, I was about to file an issue 🙂 |
EgorBo
commented
Mar 18, 2020
since #33633 is already merged could you please update |
241e949 to
3df6e71Compare3e42c06 to
93a416aComparelambdageek
commented
Mar 18, 2020
Verified that the ios sample builds in Xcode. |
vargaz
commented
Mar 19, 2020
So we didn't put them in public headers to avoid having to avoid users depending on them and thus having to support them forever. |
akoeplinger
commented
Mar 19, 2020
@vargaz you could argue that with XI relying on them we're already on that path. Do you see any of these APIs as particularly problematic? |
new plan:
|
It's already a MONO_API and it is used, for example, by Xamarin.iOS, but it wasn't in a public header. Mark it external only. There are no uses of it inside the runtiem
It was already used by Xamarin.iOS but wasn't in a public header and required compiling with --disable-visibility-hidden in order to dlsym the symbol. If --with-lazy-gc-thread-creation is used, embedders must call this function to create the finalizer therad. Otherwise the function does nothing and the runtime will create the finalizer thread automatically.
It was already marked as MONO_API, but it was not in a public header. It is used by embedders such as Xamarin.iOS
This reverts commit a0cc087.
93a416a to
c037a3eComparelambdageek
commented
Mar 24, 2020
Changed this PR to make @EgorBo could you check that the sample still compiles. |
Embedders don't need to call mono_trace_init before calling mono_trace_set_log_handler, mono_trace_set_print_handler or mono_trace_set_printerr_handler
We do not guarantee that this API will be stable
c037a3e to
7dfc6efCompareEgorBo
commented
Mar 24, 2020
@lambdageek just checked, compiles and works 👍 |
See #33633 and https://github.com/xamarin/xamarin-macios/blob/master/runtime/exports.t4
mono_install_load_aot_data_hookwas already aMONO_API, but it was not in a public header.It is added to
mono/jit/mono-private-unstable.hmono_gc_init_finalizer_threadwas used by Xamarin.iOS for a long time without being in any public header. It's one of the reasons we have to compile Mono for XI with--disable-visibility-hidden. Make the function a properMONO_APIunconditionally - but make it do nothing if the runtime is compiled without--with-lazy-thread-creation(the default). It is now a public Mono API function.mono_trace_initwas aMONO_APIfunction in a non-public header that was already used by embedders that need to set up logger hooks. It is now not necessary to call this before calling the logger functions to set up logger hooks such asmono_trace_set_log_handler