From 2254cf5a244e38a27df1e0f4d761dac68ebd55da Mon Sep 17 00:00:00 2001 From: Erik Joelsson Date: Tue, 5 May 2020 11:02:43 -0700 Subject: [PATCH] 8244247: Build failures after sjavac cleanup Reviewed-by: ihse, tbell --- make/InitSupport.gmk | 12 ++++++------ make/autoconf/bootcycle-spec.gmk.in | 3 ++- make/autoconf/spec.gmk.in | 6 +++--- make/common/JavaCompilation.gmk | 2 +- test/make/TestJavaCompilation.gmk | 9 ++------- 5 files changed, 14 insertions(+), 18 deletions(-) diff --git a/make/InitSupport.gmk b/make/InitSupport.gmk index 4484cffe211..a73855d6ad8 100644 --- a/make/InitSupport.gmk +++ b/make/InitSupport.gmk @@ -471,15 +471,15 @@ else # $(HAS_SPEC)=true # Remove any javac server logs and port files. This # prevents a new make run to reuse the previous servers. define PrepareSmartJavac - $(if $(SJAVAC_SERVER_DIR), \ - $(RM) -r $(SJAVAC_SERVER_DIR) 2> /dev/null && \ - $(MKDIR) -p $(SJAVAC_SERVER_DIR) \ + $(if $(JAVAC_SERVER_DIR), \ + $(RM) -r $(JAVAC_SERVER_DIR) 2> /dev/null && \ + $(MKDIR) -p $(JAVAC_SERVER_DIR) \ ) endef define CleanupSmartJavac - [ -f $(SJAVAC_SERVER_DIR)/server.port ] && $(ECHO) Stopping sjavac server && \ - $(TOUCH) $(SJAVAC_SERVER_DIR)/server.port.stop; true + [ -f $(JAVAC_SERVER_DIR)/server.port ] && $(ECHO) Stopping sjavac server && \ + $(TOUCH) $(JAVAC_SERVER_DIR)/server.port.stop; true endef ifeq ($(call isBuildOs, windows), true) @@ -488,7 +488,7 @@ else # $(HAS_SPEC)=true # synchronization process, wait for a while and hope it helps. This is only # used by build comparisons. define WaitForSmartJavacFinish - $(if $(SJAVAC_SERVER_DIR), \ + $(if $(JAVAC_SERVER_DIR), \ sleep 5\ ) endef diff --git a/make/autoconf/bootcycle-spec.gmk.in b/make/autoconf/bootcycle-spec.gmk.in index 13f28af3ee2..590a9170c6c 100644 --- a/make/autoconf/bootcycle-spec.gmk.in +++ b/make/autoconf/bootcycle-spec.gmk.in @@ -44,7 +44,8 @@ BOOT_JDK := $(JDK_IMAGE_DIR) # The bootcycle build has a different output directory OLD_OUTPUTDIR:=@OUTPUTDIR@ OUTPUTDIR:=$(OLD_OUTPUTDIR)/bootcycle-build -SJAVAC_SERVER_DIR:=$(patsubst $(OLD_OUTPUTDIR)%, $(OUTPUTDIR)%, $(SJAVAC_SERVER_DIR)) +# No spaces in patsubst to avoid leading space in variable +JAVAC_SERVER_DIR:=$(patsubst $(OLD_OUTPUTDIR)%,$(OUTPUTDIR)%,$(JAVAC_SERVER_DIR)) JAVA_CMD:=$(BOOT_JDK)/bin/java JAVAC_CMD:=$(BOOT_JDK)/bin/javac diff --git a/make/autoconf/spec.gmk.in b/make/autoconf/spec.gmk.in index bbbf3cd4443..d2fa64d12ab 100644 --- a/make/autoconf/spec.gmk.in +++ b/make/autoconf/spec.gmk.in @@ -356,9 +356,9 @@ BOOT_JDK_SOURCETARGET:=@BOOT_JDK_SOURCETARGET@ NUM_CORES:=@NUM_CORES@ MEMORY_SIZE:=@MEMORY_SIZE@ ENABLE_JAVAC_SERVER:=@ENABLE_JAVAC_SERVER@ -# Store sjavac server synchronization files here, and -# the sjavac server log files. -SJAVAC_SERVER_DIR=$(MAKESUPPORT_OUTPUTDIR)/javacservers +# Store javac server synchronization files here, and +# the javac server log files. +JAVAC_SERVER_DIR=$(MAKESUPPORT_OUTPUTDIR)/javacservers # Number of parallel jobs to use for compilation JOBS?=@JOBS@ diff --git a/make/common/JavaCompilation.gmk b/make/common/JavaCompilation.gmk index 22a5e5b07cb..ade1b6bcdfa 100644 --- a/make/common/JavaCompilation.gmk +++ b/make/common/JavaCompilation.gmk @@ -216,7 +216,7 @@ define SetupJavaCompilationBody # The port file contains the tcp/ip on which the server listens # and the cookie necessary to talk to the server. - $1_JAVA_SERVER_FLAGS := --server:portfile=$$(SJAVAC_SERVER_DIR)/server.port,sjavac=$$($1_ESCAPED_CMD) + $1_JAVA_SERVER_FLAGS := --server:portfile=$$(JAVAC_SERVER_DIR)/server.port,sjavac=$$($1_ESCAPED_CMD) # Always use small to launch client $1_JAVAC_CMD := $$(JAVA_SMALL) $$($1_JAVA_FLAGS) $$($1_JAVAC) $$($1_JAVA_SERVER_FLAGS) diff --git a/test/make/TestJavaCompilation.gmk b/test/make/TestJavaCompilation.gmk index bf39bbf5406..4c951e68dc4 100644 --- a/test/make/TestJavaCompilation.gmk +++ b/test/make/TestJavaCompilation.gmk @@ -239,11 +239,6 @@ TEST_TARGETS += $(OUTPUT_DIR)/_jar3_updated ################################################################################ # Test SetupJavaCompilation overrides of java files -$(eval $(call SetupJavaCompiler,BOOT_JAVAC, \ - JAVAC := $(JAVAC), \ - DISABLE_SJAVAC := true, \ -)) - JAVA_SRC_ROOT1 := $(OUTPUT_DIR)/javaroot1 JAVA_SRC_ROOT2 := $(OUTPUT_DIR)/javaroot2 @@ -285,7 +280,7 @@ $(call CreateTextFile,$(JAVA_SRC_ROOT2)/a/c.properties,#javaroot2\nname=value2\n # otherwise $(wildcard ) will not find the directories and the sanity check in # SetupJavaCompilation will fail. $(eval $(call SetupJavaCompilation, BUILD_ROOT1_FIRST, \ - SETUP := BOOT_JAVAC, \ + TARGET_RELEASE := $(TARGET_RELEASE_BOOTJDK), \ SRC := $(JAVA_SRC_ROOT1)/ $(JAVA_SRC_ROOT2)/, \ COPY := .txt .java, \ CLEAN := .properties, \ @@ -317,7 +312,7 @@ verify-root1-first: $(BUILD_ROOT1_FIRST) fi $(eval $(call SetupJavaCompilation, BUILD_ROOT2_FIRST, \ - SETUP := BOOT_JAVAC, \ + TARGET_RELEASE := $(TARGET_RELEASE_BOOTJDK), \ SRC := $(JAVA_SRC_ROOT2)/ $(JAVA_SRC_ROOT1)/, \ COPY := .txt, \ CLEAN := .properties, \