On Sun, 30 Aug 2026 18:24:17 GMT, Yunbo Zhang <[email protected]> wrote:
> **Problem:** > > When cross-compiling, `PlatformProps.java` is regenerated during every > incremental `make images` build, even when no source files have changed. This > causes `java.base` and the JDK image to be rebuilt unnecessarily, increasing > the build time. > > The second build produced output such as: > > > make CONF=linux-x86_64-server-release LOG=debug images > build.log 2>&1 > rg -n 'Processing PlatformProps.java|Compiling up to .* files for > java.base|Creating jdk image' build.log > > > > Processing PlatformProps.java > [buildjdk] Processing PlatformProps.java > Compiling up to 3396 files for java.base > [buildjdk] Compiling up to 3396 files for java.base > Creating jdk image > > > **Fix:** > > Include the target OS and CPU in the name of `BUILD_PLATFORMPROPERTIES_JAVA`, > so that the build JDK and target JDK use separate variable-dependency files > and do not overwrite each other’s build state. > > **Testing:** > > Ran `make images` again without modifying any source files. The second build > completed in about two seconds and no longer processed `PlatformProps.java`, > rebuilt `java.base`, or recreated the JDK image. > > --------- > - [x] I confirm that I make this contribution in accordance with the [OpenJDK > Interim AI Policy](https://openjdk.org/legal/ai). This pull request has now been integrated. Changeset: 70b48b9d Author: Yunbo Zhang <[email protected]> Committer: Erik Joelsson <[email protected]> URL: https://git.openjdk.org/jdk/commit/70b48b9dab2ad618c5d5547c75698093b1821ea0 Stats: 4 lines in 1 file changed: 1 ins; 0 del; 3 mod 8348737: PlatformProperties always triggers rebuild when cross compiling Reviewed-by: erikj ------------- PR: https://git.openjdk.org/jdk/pull/32593
