Skip to content
Permalink
Browse files

8232687: No static JNI loader for libprism-sw

Reviewed-by: kcr
  • Loading branch information
Johan Vos
Johan Vos committed Oct 22, 2019
1 parent a09a0fa commit 2ae171a2a0e6d1c24e6943f4f9a48987f6ed8ef4
Showing with 17 additions and 1 deletion.
  1. +1 −1 buildSrc/mac.gradle
  2. +16 −0 modules/javafx.graphics/src/main/native-prism-sw/JNIUtil.c
@@ -169,7 +169,7 @@ MAC.prism = [:]
MAC.prism.javahInclude = ["com/sun/prism/impl/**/*", "com/sun/prism/PresentableState*"]
MAC.prism.nativeSource = file("${project("graphics").projectDir}/src/main/native-prism")
MAC.prism.compiler = compiler
MAC.prism.ccFlags = ["-O3", "-DINLINE=inline", "-c", ccBaseFlags].flatten()
MAC.prism.ccFlags = ["-O3", "-DINLINE=inline", "-c", IS_STATIC_BUILD ? "-DSTATIC_BUILD" : "", ccBaseFlags].flatten()
MAC.prism.linker = linker
MAC.prism.linkFlags = linkFlagsAlt
MAC.prism.lib = "prism_common"
@@ -24,6 +24,22 @@
*/

#include <JNIUtil.h>
#ifdef STATIC_BUILD
JNIEXPORT jint JNICALL
JNI_OnLoad_prism_sw(JavaVM *vm, void * reserved) {
#ifdef JNI_VERSION_1_8
//min. returned JNI_VERSION required by JDK8 for builtin libraries
JNIEnv *env;
if ((*vm)->GetEnv(vm, (void **)&env, JNI_VERSION_1_8) != JNI_OK) {
return JNI_VERSION_1_4;
}
return JNI_VERSION_1_8;
#else
return JNI_VERSION_1_4;
#endif
}
#endif // STATIC_BUILD


jboolean
initializeFieldIds(jfieldID* dest, JNIEnv* env, jclass classHandle,

0 comments on commit 2ae171a

Please sign in to comment.
You can’t perform that action at this time.