From 309ab68e79b9212963ee8e72e7966af043946ea2 Mon Sep 17 00:00:00 2001 From: abejgonzalez Date: Thu, 6 May 2021 00:55:57 -0700 Subject: [PATCH] Use .sbtopts file --- .sbtopts | 2 ++ variables.mk | 5 ++++- 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 .sbtopts diff --git a/.sbtopts b/.sbtopts new file mode 100644 index 00000000..2358d787 --- /dev/null +++ b/.sbtopts @@ -0,0 +1,2 @@ +-Dsbt.sourcemode=true +-Dsbt.workspace=$PWD/tools diff --git a/variables.mk b/variables.mk index 2843e53e..b83693e6 100644 --- a/variables.mk +++ b/variables.mk @@ -152,7 +152,10 @@ JAVA_OPTS ?= -Xmx$(JAVA_HEAP_SIZE) -Xss8M -XX:MaxPermSize=256M -Djava.io.tmpdir= # default sbt launch command ######################################################################################### # by default build chisel3/firrtl and other subprojects from source -override SBT_OPTS += -Dsbt.sourcemode=true -Dsbt.workspace=$(base_dir)/tools +SBT_OPTS_FILE := $(base_dir)/.sbtopts +ifneq (,$(wildcard $(SBT_OPTS_FILE))) +override SBT_OPTS += $(subst $$PWD,$(base_dir),$(shell cat $(SBT_OPTS_FILE))) +endif SCALA_BUILDTOOL_DEPS = $(SBT_SOURCES)