Skip to content
Permalink
Browse files
8244247: Build failures after sjavac cleanup
Reviewed-by: ihse, tbell
  • Loading branch information
erikj79 committed May 5, 2020
1 parent 2883bcc commit 2254cf5a244e38a27df1e0f4d761dac68ebd55da
Showing with 14 additions and 18 deletions.
  1. +6 −6 make/InitSupport.gmk
  2. +2 −1 make/autoconf/bootcycle-spec.gmk.in
  3. +3 −3 make/autoconf/spec.gmk.in
  4. +1 −1 make/common/JavaCompilation.gmk
  5. +2 −7 test/make/TestJavaCompilation.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
@@ -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
@@ -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@
@@ -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)
@@ -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, \

0 comments on commit 2254cf5

Please sign in to comment.