Skip to content

[Bazel] java_rpc_toolchain does not respect Java toolchain flags  #5841

@pshabunia0epam

Description

@pshabunia0epam

Please answer these questions before submitting your issue.

What version of gRPC are you using?

1.21

What did you expect to see?

I build gRPC code with Bazel using Remote Build Execution (RBE) and I have to use a custom jdk8 toolchain [.bazelrc snippet]. Java toolchain flags don't seem propagated to the java_rpc_toolchain rule as it declares a fixed dependency on the default Java toolchain, which is jdk10 for Bazel v0.25.0. I believe this is the primary reason contributing to the following error returned by Bazel:

Unrecognized VM option 'CompactStrings'
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.

Please let me know if I can do anything else to enforce a custom Java toolchain for Bazel gRPC rules.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions