Give extra stack space to compiler without defining custom toolchain

22 views
Skip to first unread message

Christopher Kilian

unread,
May 6, 2022, 7:33:33 PM5/6/22
to bazel-discuss
Hello!

We're currently occasionally running into a StackOverflow error while an annotation processor is running. I'm looking for a way to configure the JVM running the compiler to have extra stack space.

I had success defining a custom toolchain and adding "-Xss4m" to the jvm_opts field. However, I'd like to avoid defining a custom toolchain if it can be helped.

I tried using 'bazel --host_jvm_args=-Xss4m build' as well as adding the "--jvmopt" flag to the bazelrc, but neither of these helped. Is there some other flag that I could add to the buildrc that would have the same effect as adding a field to the jvm_opts of a custom toolchain?

Thanks!

Chris

Christopher Kilian

unread,
May 6, 2022, 8:58:23 PM5/6/22
to bazel-discuss
Resolved - you can create a patch file for rules_java to add a jvm_opt that you want without defining your own toolchain.
Reply all
Reply to author
Forward
0 new messages