3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-06 17:44:08 +00:00

Allow to skip System.loadLibrary() calls from Java Native class (#4667)

This commit is contained in:
Sergey Vladimirov 2020-08-28 17:30:26 +03:00 committed by GitHub
parent 6706b0dfcd
commit 7f0b5bc129
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -542,8 +542,13 @@ def mk_java(java_dir, package_name):
java_native.write(' public static native void setInternalErrorHandler(long ctx);\n\n')
java_native.write(' static {\n')
java_native.write(' try { System.loadLibrary("z3java"); }\n')
java_native.write(' catch (UnsatisfiedLinkError ex) { System.loadLibrary("libz3java"); }\n')
java_native.write(' if (null == System.getProperty("z3.skipLibraryLoad")) {\n')
java_native.write(' try {\n')
java_native.write(' System.loadLibrary("z3java");\n')
java_native.write(' } catch (UnsatisfiedLinkError ex) {\n')
java_native.write(' System.loadLibrary("libz3java");\n')
java_native.write(' }\n')
java_native.write(' }\n')
java_native.write(' }\n')
java_native.write('\n')