RFR: 8322982: CTW fails to build after 8308753

Aleksey Shipilev shade at openjdk.org
Mon Jan 8 11:55:24 UTC 2024


On Mon, 8 Jan 2024 03:19:52 GMT, Xin Liu <xliu at openjdk.org> wrote:

> This patch fixes the build error of CTW by sidelining ModuleInfoWriter.java. ModuleInfoWriter uses Class-File API, which has transitioned to preview.
> If we really need to compile it, we have to append --enable-preview and --source N. 
> 
> The fact is CTW itself doesn't depend on ModuleInfoWriter. I think it's easier to maintain CTW if we filter it out in Makefile.

test/hotspot/jtreg/testlibrary/ctw/Makefile line 50:

> 48:     $(TESTLIBRARY_DIR)/jtreg \
> 49:     -maxdepth 1 -name '*.java')
> 50: LIB_FILES=$(filter-out %ModuleInfoWriter.java, $(LIB_FILES_ORIG))

Looks reasonable, but I think you can chain these without introducing new variables:


LIB_FILES = $(filter-out %ModuleInfoWriter.java, \
	$(shell find $(TESTLIBRARY_DIR)/jdk/test/lib/ \
    	$(TESTLIBRARY_DIR)/jdk/test/lib/process \
    	$(TESTLIBRARY_DIR)/jdk/test/lib/util \
    	$(TESTLIBRARY_DIR)/jtreg \
    	-maxdepth 1 -name '*.java'))

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

PR Review Comment: https://git.openjdk.org/jdk/pull/17292#discussion_r1444501336


More information about the hotspot-compiler-dev mailing list