Skip to content
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

8232687: No static JNI loader for libprism-sw #19

Closed
wants to merge 3 commits into from
Closed
Changes from all commits
Commits
File filter...
Filter file types
Jump to…
Jump to file
Failed to load files.

Always

Just for now

@@ -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,
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.