RFR: 8287894: Use fixed timestamp as an alternative of __DATE__ macro in jdk.jdi to make Windows build reproducible

Alexey Pavlyutkin duke at openjdk.java.net
Tue Jun 7 20:07:19 UTC 2022


Hi!

Here is a fix to jdk.jdi that fixes reproducible build for Windows. The idea of the fix is to re-use value of --with-hotspot-build-time option to generate deterministic timestamp exactly like it's done to hotspot component.

Verification (Windows-10/MSVS-2019): ```bash ./configure --with-boot-jdk=c:/work/boot-jdk/jdk-18 --with-debug-level=fastdebug --with-hotspot-build-time="6/7/2022 2:35pm" --with-extra-cflags="/experimental:deterministic" --with-extra-cxxflags="/experimental:deterministic"```

Regression (Windows-10/MSVS-2019): ```bash ./configure --with-boot-jdk=c:/work/boot-jdk/jdk-18 --with-debug-level=fastdebug```

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

Commit messages:
 - 8287894: use fixed timestamp instead of __DATE__ macro to fix reproducible Windows build

Changes: https://git.openjdk.java.net/jdk/pull/9070/files
 Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=9070&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8287894
  Stats: 21 lines in 3 files changed: 14 ins; 0 del; 7 mod
  Patch: https://git.openjdk.java.net/jdk/pull/9070.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/9070/head:pull/9070

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



More information about the build-dev mailing list