aboutsummaryrefslogtreecommitdiffhomepage
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/bootstrap/compile.sh7
1 files changed, 6 insertions, 1 deletions
diff --git a/scripts/bootstrap/compile.sh b/scripts/bootstrap/compile.sh
index 1c22e03b49..b8e98cba5b 100755
--- a/scripts/bootstrap/compile.sh
+++ b/scripts/bootstrap/compile.sh
@@ -114,9 +114,14 @@ function java_compilation() {
cat "$paramfile" >&2
fi
+ # Use BAZEL_JAVAC_OPTS to pass additional arguments to javac, e.g.,
+ # export BAZEL_JAVAC_OPTS="-J-Xmx2g -J-Xms200m"
+ # Useful if your system chooses too small of a max heap for javac.
+ # We intentionally rely on shell word splitting to allow multiple
+ # additional arguments to be passed to javac.
run "${JAVAC}" -classpath "${classpath}" -sourcepath "${sourcepath}" \
-d "${output}/classes" -source "$JAVA_VERSION" -target "$JAVA_VERSION" \
- -encoding UTF-8 "@${paramfile}"
+ -encoding UTF-8 ${BAZEL_JAVAC_OPTS} "@${paramfile}"
log "Extracting helper classes for $name..."
for f in ${library_jars} ; do