RFR: 8288396: Always create reproducible builds
When we started introducing some possibly more intrusive compiler flags and functionality for reproducible builds, we also introduced a flag to turn this off out of an abundance of caution. But we have been been using this configuration for a year or so internally within Oracle, with no issues. So there's really no reason to be able to turn this off. (If you were to ask me, the fact that compilers and build tools ever started to produce non-deterministic output has been a bug from day one.) With this fix, all randomness should be gone from our builds, at least on linux and windows. There are no more `__DATE__` and `__TIME__` macros in the source code. - Commit messages: - 8288396: Always create reproducible builds Changes: https://git.openjdk.org/jdk/pull/9152/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=9152&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8288396 Stats: 94 lines in 15 files changed: 11 ins; 63 del; 20 mod Patch: https://git.openjdk.org/jdk/pull/9152.diff Fetch: git fetch https://git.openjdk.org/jdk pull/9152/head:pull/9152 PR: https://git.openjdk.org/jdk/pull/9152
Re: RFR: 8288396: Always create reproducible builds
On Tue, 14 Jun 2022 09:48:25 GMT, Magnus Ihse Bursie wrote: > When we started introducing some possibly more intrusive compiler flags and > functionality for reproducible builds, we also introduced a flag to turn this > off out of an abundance of caution. But we have been been using this > configuration for a year or so internally within Oracle, with no issues. So > there's really no reason to be able to turn this off. (If you were to ask me, > the fact that compilers and build tools ever started to produce > non-deterministic output has been a bug from day one.) > > With this fix, all randomness should be gone from our builds, at least on > linux and windows. There are no more `__DATE__` and `__TIME__` macros in the > source code. This PR also include a more "radical" version of JDK-8287894, which probably should have been adopted by JDK-8287894 in the first place. There is no need to include the build date in the assert strings for shmem on Windows. - PR: https://git.openjdk.org/jdk/pull/9152
Re: RFR: 8288396: Always create reproducible builds [v2]
> When we started introducing some possibly more intrusive compiler flags and > functionality for reproducible builds, we also introduced a flag to turn this > off out of an abundance of caution. But we have been been using this > configuration for a year or so internally within Oracle, with no issues. So > there's really no reason to be able to turn this off. (If you were to ask me, > the fact that compilers and build tools ever started to produce > non-deterministic output has been a bug from day one.) > > With this fix, all randomness should be gone from our builds, at least on > linux and windows. There are no more `__DATE__` and `__TIME__` macros in the > source code. Magnus Ihse Bursie has updated the pull request incrementally with one additional commit since the last revision: Fix exitTransportWithError signature - Changes: - all: https://git.openjdk.org/jdk/pull/9152/files - new: https://git.openjdk.org/jdk/pull/9152/files/8bc40ddb..e2f5fc05 Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=9152&range=01 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=9152&range=00-01 Stats: 33 lines in 5 files changed: 0 ins; 27 del; 6 mod Patch: https://git.openjdk.org/jdk/pull/9152.diff Fetch: git fetch https://git.openjdk.org/jdk pull/9152/head:pull/9152 PR: https://git.openjdk.org/jdk/pull/9152
Re: RFR: 8288396: Always create reproducible builds [v2]
On Tue, 14 Jun 2022 10:09:37 GMT, Magnus Ihse Bursie wrote: >> When we started introducing some possibly more intrusive compiler flags and >> functionality for reproducible builds, we also introduced a flag to turn >> this off out of an abundance of caution. But we have been been using this >> configuration for a year or so internally within Oracle, with no issues. So >> there's really no reason to be able to turn this off. (If you were to ask >> me, the fact that compilers and build tools ever started to produce >> non-deterministic output has been a bug from day one.) >> >> With this fix, all randomness should be gone from our builds, at least on >> linux and windows. There are no more `__DATE__` and `__TIME__` macros in the >> source code. > > Magnus Ihse Bursie has updated the pull request incrementally with one > additional commit since the last revision: > > Fix exitTransportWithError signature I made some additional cleanup associated with shmem. I think that `sysAssert` can (and probably should) be replaced with `SHMEM_ASSERT`. I can fix that as well, if someone from serviceability says that I should do it. - PR: https://git.openjdk.org/jdk/pull/9152
Re: RFR: 8288396: Always create reproducible builds [v2]
On Tue, 14 Jun 2022 10:09:37 GMT, Magnus Ihse Bursie wrote: >> When we started introducing some possibly more intrusive compiler flags and >> functionality for reproducible builds, we also introduced a flag to turn >> this off out of an abundance of caution. But we have been been using this >> configuration for a year or so internally within Oracle, with no issues. So >> there's really no reason to be able to turn this off. (If you were to ask >> me, the fact that compilers and build tools ever started to produce >> non-deterministic output has been a bug from day one.) >> >> With this fix, all randomness should be gone from our builds, at least on >> linux and windows. There are no more `__DATE__` and `__TIME__` macros in the >> source code. > > Magnus Ihse Bursie has updated the pull request incrementally with one > additional commit since the last revision: > > Fix exitTransportWithError signature make/autoconf/flags-ldflags.m4 line 132: > 130: > 131: if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then > 132: REPRODUCIBLE_LDFLAGS="-experimental:deterministic" For the cflag, we check that the compiler supports it, but for the linker flag you are just setting it without a check. Before this patch, if we got here and ENABLE_REPRODUCIBLE_BUILD was true, it meant that the test had passed for the compiler, from which we could assume it would also work for the linker, but that is no longer the case. - PR: https://git.openjdk.org/jdk/pull/9152
Re: RFR: 8288396: Always create reproducible builds [v2]
On Tue, 14 Jun 2022 11:54:40 GMT, Erik Joelsson wrote: >> Magnus Ihse Bursie has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Fix exitTransportWithError signature > > make/autoconf/flags-ldflags.m4 line 132: > >> 130: >> 131: if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then >> 132: REPRODUCIBLE_LDFLAGS="-experimental:deterministic" > > For the cflag, we check that the compiler supports it, but for the linker > flag you are just setting it without a check. Before this patch, if we got > here and ENABLE_REPRODUCIBLE_BUILD was true, it meant that the test had > passed for the compiler, from which we could assume it would also work for > the linker, but that is no longer the case. Good point. - PR: https://git.openjdk.org/jdk/pull/9152