RFR: Building jre/jdk images from jmod files
Mandy Chung
mandy.chung at oracle.com
Fri Feb 17 16:35:57 PST 2012
Chris,
I like your idea separating the native cmds, native libs, and config
files during the jdk build so that they can be added in the proper
section of the jmod file. Setting --natlib of the system module library
to "bin" on Windows will keep the jigsaw module image working and allows
the necessary changes in the jdk implementation to happen later. I'm
amazed that you can find a way to do this cleanly hacking the makefiles
for jdk modularization.
> http://cr.openjdk.java.net/~chegar/jigsaw/jmods_webrev.00/webrev/
Your patch looks good.
One thing to note: debug libraries is on the list for investigation.
make/modules/Makefile currently filters out *.map and *.pdb files from
the modules it create. This was done before the introduction of
debuginfo files and we wanted to be able to measure the module size
without debug libs. Just to mention it since you may try to find *.map
and *.pdb on windows build and don't see them there.
For testing - the default test set should cover many areas. I generally
would also run jdk_beans* jdk_management*, jdk_security*, and jdk_tools1
test targets. The ModuleProblemList.txt is due for update but the
failures should just be a few.
Thanks
Mandy
On 2/17/2012 1:35 AM, Chris Hegarty wrote:
> 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