RFR: JDK-8255620: Build race between modulegraphs and exploded-image-optimize targets

Tim Bell tbell at openjdk.java.net
Fri Oct 30 01:57:45 UTC 2020


On Thu, 29 Oct 2020 22:00:52 GMT, Erik Joelsson <erikj at openjdk.org> wrote:

> When I reorganized top level docs build targets in JDK-8206311, a race was introduced. The docs-*-modulegraph targets use the BUILD_JDK to run a build tool. For this to work, the BUILD_JDK needs to be ready for usage. In a normal native build, this means that the exploded-image-optimize target needs to be done. This dependency is however missing, so we sometimes get errors like this:
> 
> * For target support_docs_JDK_API-gengraphs__gengraphs_JDK_API_exec:
> Error occurred during initialization of boot layer
> java.lang.module.FindException: Error reading module: /w/jdk/build/jdk/modules/jdk.security.jgss
> Caused by: java.lang.module.InvalidModuleDescriptorException: Truncated module-info.class
> 
> To fix this, I propose adding a new top level target "runnable-buildjdk". This new target will do different things depending which kind of BUILD_JDK the current configuration is set to use. The default BUILD_JDK is just the exploded image. When cross compiling, we either create a BUILD_JDK explicitly, or we use an externally provided BUILD_JDK. By introducing this virtual target, we don't need to sprinkle these conditionals in quite so many places.

Looks good

-------------

PR: https://git.openjdk.java.net/jdk/pull/947



More information about the build-dev mailing list