From 766443b2d4defb8383c0286c89855736c64b98eb Mon Sep 17 00:00:00 2001 From: Jerry Zhao Date: Sat, 23 Jan 2021 13:42:59 -0800 Subject: [PATCH] Avoid permissions conflict on shared protocjar.webcache The Java protoc plugin (part of FIRRTL) by default caches protoc in /tmp, and does not delete it afterwards. This causes permissions failures when multiple users try to install Chipyard on the same machine, due to permissions failures over accessing the same cache in /tmp. A solution is to place the tmpdir within the Chipyard repo. No other files besides protocjar.webcache currently use that directory, so I believe this should be safe. --- variables.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/variables.mk b/variables.mk index 88ba73ee21..2843e53e54 100644 --- a/variables.mk +++ b/variables.mk @@ -146,7 +146,7 @@ sim_common_files ?= $(build_dir)/sim_files.common.f # java arguments used in sbt ######################################################################################### JAVA_HEAP_SIZE ?= 8G -JAVA_OPTS ?= -Xmx$(JAVA_HEAP_SIZE) -Xss8M -XX:MaxPermSize=256M +JAVA_OPTS ?= -Xmx$(JAVA_HEAP_SIZE) -Xss8M -XX:MaxPermSize=256M -Djava.io.tmpdir=$(base_dir)/.java_tmp ######################################################################################### # default sbt launch command