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. ------------- Commit messages: - Adjusted comment - Introduce runnable-buildjdk target Changes: https://git.openjdk.java.net/jdk/pull/947/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=947&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8255620 Stats: 17 lines in 1 file changed: 12 ins; 0 del; 5 mod Patch: https://git.openjdk.java.net/jdk/pull/947.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/947/head:pull/947 PR: https://git.openjdk.java.net/jdk/pull/947