8332808: Always set java.io.tmpdir to a suitable value in the build
Reviewed-by: erikj
This commit is contained in:
parent
e19a421c30
commit
90758f6735
@ -501,9 +501,12 @@ else # $(HAS_SPEC)=true
|
||||
# Failure logs are only supported for "parallel" main targets, not the
|
||||
# (trivial) sequential make targets (such as clean and reconfigure),
|
||||
# since the failure-logs directory creation will conflict with clean.
|
||||
# We also make sure the javatmp directory exists, which is needed if a java
|
||||
# process (like javac) is using java.io.tmpdir.
|
||||
define PrepareFailureLogs
|
||||
$(RM) -r $(MAKESUPPORT_OUTPUTDIR)/failure-logs 2> /dev/null && \
|
||||
$(MKDIR) -p $(MAKESUPPORT_OUTPUTDIR)/failure-logs
|
||||
$(MKDIR) -p $(JAVA_TMP_DIR)
|
||||
$(RM) $(MAKESUPPORT_OUTPUTDIR)/exit-with-error 2> /dev/null
|
||||
endef
|
||||
|
||||
|
@ -353,6 +353,8 @@ BUNDLES_OUTPUTDIR = $(OUTPUTDIR)/bundles
|
||||
TESTMAKE_OUTPUTDIR = $(OUTPUTDIR)/test-make
|
||||
MAKESUPPORT_OUTPUTDIR = $(OUTPUTDIR)/make-support
|
||||
|
||||
JAVA_TMP_DIR = $(SUPPORT_OUTPUTDIR)/javatmp
|
||||
|
||||
# This does not get overridden in a bootcycle build
|
||||
CONFIGURESUPPORT_OUTPUTDIR := @CONFIGURESUPPORT_OUTPUTDIR@
|
||||
BUILDJDK_OUTPUTDIR = $(OUTPUTDIR)/buildjdk
|
||||
@ -634,7 +636,8 @@ STATIC_BUILD := @STATIC_BUILD@
|
||||
|
||||
STRIPFLAGS := @STRIPFLAGS@
|
||||
|
||||
JAVA_FLAGS := @JAVA_FLAGS@
|
||||
JAVA_FLAGS_TMPDIR := -Djava.io.tmpdir=$(JAVA_TMP_DIR)
|
||||
JAVA_FLAGS := @JAVA_FLAGS@ $(JAVA_FLAGS_TMPDIR)
|
||||
JAVA_FLAGS_BIG := @JAVA_FLAGS_BIG@
|
||||
JAVA_FLAGS_SMALL := @JAVA_FLAGS_SMALL@
|
||||
BUILD_JAVA_FLAGS_SMALL := @BUILD_JAVA_FLAGS_SMALL@
|
||||
|
@ -197,7 +197,7 @@ define SetupJavaCompilationBody
|
||||
|
||||
ifeq ($$($1_COMPILER), bootjdk)
|
||||
# Javac server is not available when using the bootjdk compiler.
|
||||
$1_JAVAC_CMD := $$(JAVAC)
|
||||
$1_JAVAC_CMD := $$(JAVAC) -J$$(JAVA_FLAGS_TMPDIR)
|
||||
|
||||
ifeq ($$($1_SMALL_JAVA), true)
|
||||
$1_FLAGS += $$(addprefix -J, $$(JAVA_FLAGS_SMALL))
|
||||
@ -211,7 +211,7 @@ define SetupJavaCompilationBody
|
||||
$1_TARGET_RELEASE := $$(TARGET_RELEASE_BOOTJDK)
|
||||
endif
|
||||
else ifeq ($$($1_COMPILER), buildjdk)
|
||||
$1_JAVAC_CMD := $$(BUILD_JAVAC)
|
||||
$1_JAVAC_CMD := $$(BUILD_JAVAC) -J$$(JAVA_FLAGS_TMPDIR)
|
||||
|
||||
ifeq ($$($1_TARGET_RELEASE), )
|
||||
# If unspecified, default to the new jdk we're building
|
||||
|
Loading…
Reference in New Issue
Block a user