On Wed, 31 Aug 2022 20:02:46 GMT, Erik Joelsson <er...@openjdk.org> wrote:
>> Jan Lahoda has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Reflecting review feedback. > > make/common/JavaCompilation.gmk line 451: > >> 449: # $$($1_VARDEPS_FILE) is used as dependency to track changes in set >> of >> 450: # list of files. >> 451: $$($1_COMPILE_TARGET): $$($1_SRCS) $$($1_DEPENDS) \ > > What's the reason for inlining this recipe into the main compilation recipe? > I would think generating the modfiles file in the FILELIST rule would help > reduce the noise from non source files in the prerequisites list (as the old > FILELIST rule had a lot less prerequisites listed). Keeping this recipe > separate also limits regeneration of the FILELIST. I've tried to fix this in: https://github.com/openjdk/jdk/pull/10104/commits/f1e19e8b636ddf08500a6401ce1488265f7b9446 > make/common/JavaCompilation.gmk line 456: > >> 454: $$(call LogWarn, Compiling up to $$(words $$($1_SRCS)) >> files for $1) >> 455: $$(eval $$(call ListPathsSafely, $1_SRCS, >> $$($1_FILELIST))) >> 456: $$(call WriteFile, "-XDmodifiedInputs=$$? ", >> $$@.modfiles) > > I'm not sure WriteFile is safe to use here. `$?` could potentially contain > all files in `$1_SRCS`, which is why we use ListPathsSafely in the first > place. This is only a problem if using make <4.0, but as long as that's not > prohibited, we need to keep it working without the file function. Is there some recommendation on how to generate what is needed? Which is: "-XDmodifiedFiles=<list-of-files> " I was looking at the `WriteFile` rule, and it is not clear to be what is the problem there, but I'm not very knowledgeable of the build system. I was trying to use `ListPathsSafely`, but wasn't able to find a way that would be working. Thanks! ------------- PR: https://git.openjdk.org/jdk/pull/10104