RFR: Building jre/jdk images from jmod files
Chris Hegarty
chris.hegarty at oracle.com
Fri Feb 17 01:35:56 PST 2012
This is a follow up to the work for supporting native libraries and
commands outside the module library.
The issue is that we previously could not (reasonably) create the module
images from jmod files. The reason is that the native libraries and
config files were not being put into the correct section of the jmod
files. For example, on Windows the dll's and exe's were put into the
NATIVE_CMDS section. Setting --natlib on Windows and installing would
not effect where the dll's get installed.
Since the post processing construction of the modules will eventually be
replaced, I didn't want to spend too much time rewriting much of the
makefile, instead I guess you could say this is a little bit of a cheat!
Unix,
Basically, anything put into the build lib/(LIBARCH) directory can be
considered a native library, or jvm.cfg/Xusage.txt/debuginfo which are
closely related and therefore packaged with NATIVE_LIBS. Everything else
in the build lib directory, *.properties, *.data, *.policy, tz data,
fonts, go into the CONFIG section. Native commands go into NATIVE_CMDS.
Windows
Since the dll's and exe's are created and put in the build bin
directory, I simply modified the makefiles to know they are dealing with
a native command and put it into the modules bin dir, then everything
else in the build bin directory must be a native lib ( or closely
related pdb/map/etc). Now the contents of the build lib directory are
simply *.properties, *.data, *.policy, tz data, fonts, go into the
CONFIG section.
I verified that module images built with the changes are the same as
without. Additionally, BUILD_PACKAGES=false still works ( for faster
builds ).
http://cr.openjdk.java.net/~chegar/jigsaw/jmods_webrev.00/webrev/
Thanks,
-Chris.
More information about the jigsaw-dev
mailing list