Skip to content

Conversation

zhanchangbao-sanechips
Copy link

Summary

This PR adds support for building protoc-gen-grpc-java on the RISC-V platform and provides prebuilt binaries, addressing the lack of official RISC-V support and prebuilts for protoc-gen-grpc-java.

Changes

Updated build scripts to detect and recognize riscv64 as a supported target platform.
Extended architecture-specific logic in compiler/build.gradle and compiler/check-artifact.sh to include the riscv64 architecture, enabling proper compilation for RISC-V.
Ensured all newly added code paths are conditionally compiled—this modification does not impact existing supported architectures (e.g., x86_64, ARM).

Motivation

RISC-V is an open, rapidly evolving CPU architecture with growing adoption. Prior to this PR:
protoc-gen-grpc-java lacked official build support for RISC-V, leading to compilation failures when attempting to build natively or cross-compile for the platform.
No protoc-gen-grpc-java prebuilt binaries for RISC-V exist in Maven Central Repository (https://repo1.maven.org/maven2/io/grpc/protoc-gen-grpc-java/), which blocked direct use of protoc-gen-grpc-java prebuilts for Maven-based projects (e.g., Hadoop, Spark, and related plugins) on RISC-V.
This PR resolves both gaps to unblock RISC-V adoption for protoc-gen-grpc-java dependent projects.

Testing

Successfully built protoc-gen-grpc-java natively on a Sophgo SG2042 RISC-V CPU running Linux.
Used the RISC-V-built protoc-gen-grpc-java to compile Spark on riscv64 successfully.

Additional Notes
protoc prebuilt binaries:https://github.com/zhanchangbao-sanechips/plugin-repo/protoc-gen-grpc-java-1.47.0-linux-riscv64.exe.

Copy link

linux-foundation-easycla bot commented Aug 21, 2025

CLA Signed

  • ✅login: zhanchangbao-sanechips / name: zhan.changbao / (1acb6b0)

The committers listed above are authorized under a signed CLA.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant