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).

@benshuai5D 
Your change (at version 049f2e47d4e7b189f0023c9063ab5949c4cf12d1) is now ready 
to be sponsored by a Committer.

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

PR Comment: https://git.openjdk.org/jdk/pull/32593#issuecomment-5479576004

Reply via email to