On Wed, Nov 22, 2017 at 6:09 PM, Erik Joelsson <erik.joels...@oracle.com> wrote:
> Hello, > > On 2017-11-22 08:30, Thomas Stüfe wrote: > >> On Wed, Nov 22, 2017 at 4:40 PM, Andrew Haley <a...@redhat.com> wrote: >> >> On 22/11/17 15:29, Thomas Stüfe wrote: >>> >>>> when building zero on Linux x64, I notice that the build is extremely >>>> >>> slow, >>> >>>> due to what I assume is jmod ran from the built image, which would only >>>> >>> run >>> >>>> interpreted? Is my guess true, and if yes, is it possible to use a >>>> different jmod? I assume it is not possible to use jmod from the build >>>> >>> jdk? >>> >>> No, because the bootstrap JDK is version N-1. >>> >>> >>> Ah, right. >> >> >> Hmm, I wonder if you could cross-compile the JDK from x86 native -> x86 >>> zero. >>> >>> Does it have to be from the same build? If I build zero and normal >> product >> from the same head, could I not use the jmod from the product build for >> zero? >> >> Yes you can indeed! There is a configure option: > > --with-build-jdk path to JDK of same version as is being built[the > newly built JDK] > > If set, this jdk is used instead of the newly built jdk for any tool that > needs to run, like jmod and jlink. I realize the help text could be more > elaborate in explaining this. This option is meant for your usecase as well > as an option to speed up cross compilation builds. (When cross compiling, > we otherwise have to build a minimal jdk for the host system to run jmod > and jlink during the build.) > > Note that for best performance, point this to the images/jdk directory of > the release (non debug) build of the jdk for the native platform. Also note > that it's only guaranteed to work if you use the exact same version as you > are building zero from. If your build-jdk gets stale, weird things can > start happening. > > :) precisely what I needed, thank you! ..Thomas > /Erik >