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
|
# Failure logs are only supported for "parallel" main targets, not the
|
||||||
# (trivial) sequential make targets (such as clean and reconfigure),
|
# (trivial) sequential make targets (such as clean and reconfigure),
|
||||||
# since the failure-logs directory creation will conflict with clean.
|
# 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
|
define PrepareFailureLogs
|
||||||
$(RM) -r $(MAKESUPPORT_OUTPUTDIR)/failure-logs 2> /dev/null && \
|
$(RM) -r $(MAKESUPPORT_OUTPUTDIR)/failure-logs 2> /dev/null && \
|
||||||
$(MKDIR) -p $(MAKESUPPORT_OUTPUTDIR)/failure-logs
|
$(MKDIR) -p $(MAKESUPPORT_OUTPUTDIR)/failure-logs
|
||||||
|
$(MKDIR) -p $(JAVA_TMP_DIR)
|
||||||
$(RM) $(MAKESUPPORT_OUTPUTDIR)/exit-with-error 2> /dev/null
|
$(RM) $(MAKESUPPORT_OUTPUTDIR)/exit-with-error 2> /dev/null
|
||||||
endef
|
endef
|
||||||
|
|
||||||
|
@ -353,6 +353,8 @@ BUNDLES_OUTPUTDIR = $(OUTPUTDIR)/bundles
|
|||||||
TESTMAKE_OUTPUTDIR = $(OUTPUTDIR)/test-make
|
TESTMAKE_OUTPUTDIR = $(OUTPUTDIR)/test-make
|
||||||
MAKESUPPORT_OUTPUTDIR = $(OUTPUTDIR)/make-support
|
MAKESUPPORT_OUTPUTDIR = $(OUTPUTDIR)/make-support
|
||||||
|
|
||||||
|
JAVA_TMP_DIR = $(SUPPORT_OUTPUTDIR)/javatmp
|
||||||
|
|
||||||
# This does not get overridden in a bootcycle build
|
# This does not get overridden in a bootcycle build
|
||||||
CONFIGURESUPPORT_OUTPUTDIR := @CONFIGURESUPPORT_OUTPUTDIR@
|
CONFIGURESUPPORT_OUTPUTDIR := @CONFIGURESUPPORT_OUTPUTDIR@
|
||||||
BUILDJDK_OUTPUTDIR = $(OUTPUTDIR)/buildjdk
|
BUILDJDK_OUTPUTDIR = $(OUTPUTDIR)/buildjdk
|
||||||
@ -634,7 +636,8 @@ STATIC_BUILD := @STATIC_BUILD@
|
|||||||
|
|
||||||
STRIPFLAGS := @STRIPFLAGS@
|
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_BIG := @JAVA_FLAGS_BIG@
|
||||||
JAVA_FLAGS_SMALL := @JAVA_FLAGS_SMALL@
|
JAVA_FLAGS_SMALL := @JAVA_FLAGS_SMALL@
|
||||||
BUILD_JAVA_FLAGS_SMALL := @BUILD_JAVA_FLAGS_SMALL@
|
BUILD_JAVA_FLAGS_SMALL := @BUILD_JAVA_FLAGS_SMALL@
|
||||||
|
@ -197,7 +197,7 @@ define SetupJavaCompilationBody
|
|||||||
|
|
||||||
ifeq ($$($1_COMPILER), bootjdk)
|
ifeq ($$($1_COMPILER), bootjdk)
|
||||||
# Javac server is not available when using the bootjdk compiler.
|
# 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)
|
ifeq ($$($1_SMALL_JAVA), true)
|
||||||
$1_FLAGS += $$(addprefix -J, $$(JAVA_FLAGS_SMALL))
|
$1_FLAGS += $$(addprefix -J, $$(JAVA_FLAGS_SMALL))
|
||||||
@ -211,7 +211,7 @@ define SetupJavaCompilationBody
|
|||||||
$1_TARGET_RELEASE := $$(TARGET_RELEASE_BOOTJDK)
|
$1_TARGET_RELEASE := $$(TARGET_RELEASE_BOOTJDK)
|
||||||
endif
|
endif
|
||||||
else ifeq ($$($1_COMPILER), buildjdk)
|
else ifeq ($$($1_COMPILER), buildjdk)
|
||||||
$1_JAVAC_CMD := $$(BUILD_JAVAC)
|
$1_JAVAC_CMD := $$(BUILD_JAVAC) -J$$(JAVA_FLAGS_TMPDIR)
|
||||||
|
|
||||||
ifeq ($$($1_TARGET_RELEASE), )
|
ifeq ($$($1_TARGET_RELEASE), )
|
||||||
# If unspecified, default to the new jdk we're building
|
# If unspecified, default to the new jdk we're building
|
||||||
|
Loading…
x
Reference in New Issue
Block a user