-
Notifications
You must be signed in to change notification settings - Fork 5.3k
[mono] Make some API functions public and private #33736
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
Conversation
|
heh, I was about to file an issue 🙂 |
|
since #33633 is already merged could you please update |
241e949 to
3df6e71
Compare
3e42c06 to
93a416a
Compare
|
Verified that the ios sample builds in Xcode. |
|
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. |
|
@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
c037a3e
Compare
|
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
7dfc6ef
Compare
|
@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