On Tue, 3 Nov 2020 20:06:35 GMT, Erik Joelsson <er...@openjdk.org> wrote:
> After building the JDK from clean, the first incremental build of hotspot > will recompile all of it. This is caused by a difference in the CFLAGS > generated on the second go. The difference is generated in > JdkNativeCompilation.gmk, where the module specific java header dir is always > added to the list of include dirs. When compiling hotspot the first time, > there is no such dir, and so nothing is added, but the second go, later > compilation steps have created the base headers dir > ($(SUPPORT_OUTPUTDIR)/headers), which is found and picked up in CFLAGS. This > difference is then detected by the DependOnVariable construct for libjvm. > > The fix here is to make sure SetupJdkLibrary is able to work in a context > without a MODULE defined, since that is how libjvm is built. In that case, no > java header dir should be added. > > While fixing this I decided to go through the whole file and make sure all > uses of MODULE were protected when needed. This pull request has now been integrated. Changeset: 76fa974c Author: Erik Joelsson <er...@openjdk.org> URL: https://git.openjdk.java.net/jdk/commit/76fa974c Stats: 30 lines in 1 file changed: 23 ins; 0 del; 7 mod 8255850: Hotspot recompiled on first incremental build Reviewed-by: ihse ------------- PR: https://git.openjdk.java.net/jdk/pull/1041