aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWilliam Muir <[email protected]>2021-11-13 14:30:34 +0000
committerMikael Urankar <[email protected]>2021-11-13 15:11:27 +0000
commitc77faeee3ec0056573a33e3bc850f5187b1789c4 (patch)
tree2f2c36a071cafb45f4322dd1b7a34c1ff95aa3a0
parente36c61dc186c96ee73cff434b710a0d37323f449 (diff)
downloadports-c77faeee3ec0056573a33e3bc850f5187b1789c4.tar.gz
ports-c77faeee3ec0056573a33e3bc850f5187b1789c4.zip
devel/bazel: Unbreak on aarch64.
Set initial and max Java heap to 128M and 1G respectively when building Bazel under aarch64. PR: 229420
-rw-r--r--devel/bazel/Makefile6
1 files changed, 5 insertions, 1 deletions
diff --git a/devel/bazel/Makefile b/devel/bazel/Makefile
index 834f332f1f40..cd1a9a740744 100644
--- a/devel/bazel/Makefile
+++ b/devel/bazel/Makefile
@@ -12,7 +12,6 @@ COMMENT= Fast and correct build system
LICENSE= APACHE20
LICENSE_FILE= ${WRKSRC}/LICENSE
-BROKEN_aarch64= fails to build: java.lang.OutOfMemoryError: Java heap space
BROKEN_armv6= fails to package: cp: bazel: No such file or directory
BROKEN_armv7= fails to package: cp: bazel: No such file or directory
BROKEN_FreeBSD_12_powerpc64= fails to compile: Action failed to execute: java.io.IOException: Cannot run program /usr/bin/clang
@@ -49,6 +48,10 @@ FINALRC= 2
EXTRA_PATCHES+= ${FILESDIR}/extra-i386_tools_cpp_BUILD.static.bsd
.endif
+.if ${ARCH} == "aarch64"
+BAZEL_JAVAC_OPTS+= "-J-Xmx1g -J-Xms128m"
+.endif
+
pre-patch:
@${CP} ${FILESDIR}/extra-patch-absl_base_internal_unscaledcycleclock.cc \
${FILESDIR}/extra-patch-bazel_grpc__deps.bzl \
@@ -83,6 +86,7 @@ do-build:
EMBED_LABEL='${PORTVERSION}' \
PATH=${LOCALBASE}/bin:$$PATH \
SOURCE_DATE_EPOCH=$${SOURCE_DATE_EPOCH} \
+ BAZEL_JAVAC_OPTS=${BAZEL_JAVAC_OPTS} \
EXTRA_BAZEL_ARGS=--host_javabase=@local_jdk//:jdk \
${LOCALBASE}/bin/bash ./compile.sh)