module structure for ISA-specific sources and classes
Magnus Ihse Bursie
magnus.ihse.bursie at oracle.com
Mon Sep 15 11:49:05 UTC 2014
> The JNI code for JFFI, which is shared, can go here as expected:
> src/java.base/share/native/jdk/internal/ffi/...
Please note that there is a new structure to the "native" directories.
If the native code is supposed to compile into a libffi.so, the
directory should be named src/java.base/share/native/libffi, so that
there is a 1-to-1 match between directory name and the name of the
native library.
The exception is code which is shared between several libraries, which
is stored, a bit more ad-hoc, in a suitable subdirectory the
.../native/common directory.
If you are combining an upstream open source library with some
additional "wrapping" code, I would suggest creating a library with a
name distinct from the upstream library, e.g. libjavaffi, and storing
the upstream source in a separate subdirectory, eg. libjavaffi/libffi.
This will help the open source community to use a system-installed
version of the library instead of bundling it.
But then again, I might have misunderstood completely what you're trying
to achieve. :-)
/Magnus
More information about the panama-dev
mailing list