Currently, building static libs is unreliable, because multiple modules may define a JNI_OnLoad or JNI_OnUnload symbol; these symbols crash in static contexts.
We use macros and conditions when building our native code to work around this slightly, but it's messy; instead of using these symbols, specifically, we should have our own on-load and on-unload logic which is safely composable, and which can then be dispatched from the umbrella layer's JNI_OnLoad and/or JNI_OnUnload.
Currently, building static libs is unreliable, because multiple modules may define a
JNI_OnLoadorJNI_OnUnloadsymbol; these symbols crash in static contexts.We use macros and conditions when building our native code to work around this slightly, but it's messy; instead of using these symbols, specifically, we should have our own on-load and on-unload logic which is safely composable, and which can then be dispatched from the umbrella layer's
JNI_OnLoadand/orJNI_OnUnload.