File tree Expand file tree Collapse file tree 7 files changed +19
-2
lines changed Expand file tree Collapse file tree 7 files changed +19
-2
lines changed Original file line number Diff line number Diff line change @@ -9,6 +9,7 @@ RUN export DEBIAN_FRONTEND=noninteractive && \
99 curl \
1010 g++-aarch64-linux-gnu \
1111 g++-powerpc64le-linux-gnu \
12+ g++-riscv64-linux-gnu \
1213 openjdk-8-jdk \
1314 pkg-config \
1415 && \
Original file line number Diff line number Diff line change @@ -21,3 +21,5 @@ trap spongify_logs EXIT
2121# internal compiler error: output_operand: invalid %-code
2222" $GRPC_JAVA_DIR " /buildscripts/run_in_docker.sh grpc-java-artifacts-ubuntu2004 env \
2323 SKIP_TESTS=true ARCH=s390_64 /grpc-java/buildscripts/kokoro/unix.sh
24+ " $GRPC_JAVA_DIR " /buildscripts/run_in_docker.sh grpc-java-artifacts-multiarch env \
25+ SKIP_TESTS=true ARCH=riscv64 /grpc-java/buildscripts/kokoro/unix.sh
Original file line number Diff line number Diff line change 1313# ARCH=ppcle_64 ./buildscripts/kokoro/unix.sh
1414# For s390x arch:
1515# ARCH=s390_64 ./buildscripts/kokoro/unix.sh
16+ # For riscv64 arch:
17+ # ARCH=riscv_64 ./buildscripts/kokoro/unix.sh
1618
1719# This script assumes `set -e`. Removing it may lead to undefined behavior.
1820set -exu -o pipefail
8991LOCAL_MVN_TEMP=$( mktemp -d)
9092# Note that this disables parallel=true from GRADLE_FLAGS
9193if [[ -z " ${ALL_ARTIFACTS:- } " ]]; then
92- if [[ " $ARCH " = " aarch_64" || " $ARCH " = " ppcle_64" || " $ARCH " = " s390_64" ]]; then
94+ if [[ " $ARCH " = " aarch_64" || " $ARCH " = " ppcle_64" || " $ARCH " = " s390_64" || " $ARCH " = " riscv64 " ]]; then
9395 GRADLE_FLAGS+=" -x grpc-compiler:generateTestProto -x grpc-compiler:generateTestLiteProto"
9496 GRADLE_FLAGS+=" -x grpc-compiler:testGolden -x grpc-compiler:testLiteGolden"
9597 GRADLE_FLAGS+=" -x grpc-compiler:testDeprecatedGolden -x grpc-compiler:testDeprecatedLiteGolden"
Original file line number Diff line number Diff line change @@ -40,6 +40,9 @@ LOCAL_OTHER_ARTIFACTS="$KOKORO_GFILE_DIR"/github/grpc-java/artifacts/
4040# for linux s390x platform
4141[[ " $( find " $LOCAL_MVN_ARTIFACTS " -type f -iname ' protoc-gen-grpc-java-*-linux-s390_64.exe' | wc -l) " != ' 0' ]]
4242
43+ # for linux riscv64 platform
44+ [[ " $( find " $LOCAL_MVN_ARTIFACTS " -type f -iname ' protoc-gen-grpc-java-*-linux-riscv64.exe' | wc -l) " != ' 0' ]]
45+
4346# from macos job:
4447[[ " $( find " $LOCAL_MVN_ARTIFACTS " -type f -iname ' protoc-gen-grpc-java-*-osx-x86_64.exe' | wc -l) " != ' 0' ]]
4548# copy all x86 artifacts to aarch until native artifacts are built
Original file line number Diff line number Diff line change 5555 GCC_ARCH=s390x-linux-gnu
5656 elif [[ " $ARCH " == loongarch_64 ]]; then
5757 GCC_ARCH=loongarch64-unknown-linux-gnu
58+ elif [[ " $ARCH " == riscv* ]]; then
59+ GCC_ARCH=riscv64-unknown-linux-gnu
5860 else
5961 echo " Unknown architecture: $ARCH "
6062 exit 1
Original file line number Diff line number Diff line change @@ -63,6 +63,7 @@ model {
6363 linker. executable = ' s390x-linux-gnu-g++'
6464 }
6565 target(" loongarch_64" )
66+ target(" riscv64" )
6667 }
6768 clang(Clang ) {
6869 target(" aarch_64" ) {}
@@ -76,6 +77,7 @@ model {
7677 aarch_64 { architecture " aarch_64" }
7778 s390_64 { architecture " s390_64" }
7879 loongarch_64 { architecture " loongarch_64" }
80+ riscv64 { architecture " riscv64" }
7981 }
8082
8183 components {
@@ -86,7 +88,8 @@ model {
8688 ' ppcle_64' ,
8789 ' aarch_64' ,
8890 ' s390_64' ,
89- ' loongarch_64'
91+ ' loongarch_64' ,
92+ ' riscv64'
9093 ]) {
9194 // If arch is not within the defined platforms, we do not specify the
9295 // targetPlatform so that Gradle will choose what is appropriate.
Original file line number Diff line number Diff line change @@ -63,6 +63,8 @@ checkArch ()
6363 assertEq " $format " " elf64-little" $LINENO
6464 elif [[ " $ARCH " == loongarch_64 ]]; then
6565 echo $format
66+ elif [[ " $ARCH " == riscv64 ]]; then
67+ assertEq " $format " " elf64-littleriscv" $LINENO
6668 assertEq " $format " " elf64-loongarch" $LINENO
6769 elif [[ " $ARCH " == ppcle_64 ]]; then
6870 format=" $( powerpc64le-linux-gnu-objdump -f " $1 " | grep -o " file format .*$" | grep -o " [^ ]*$" ) "
@@ -121,6 +123,8 @@ checkDependencies ()
121123 white_list=" ${white_list} \|libm\.so\.6"
122124 elif [[ " $ARCH " == aarch_64 ]]; then
123125 white_list=" ${white_list} \|ld-linux-aarch64\.so\.1"
126+ elif [[ " $ARCH " == riscv64 ]]; then
127+ white_list=" libm\.so\.6\|libc\.so\.6\|ld-linux-riscv64-lp64d\.so\.1"
124128 fi
125129 elif [[ " $OS " == osx ]]; then
126130 dump_cmd=' otool -L ' " $1 " ' | fgrep dylib'
You can’t perform that action at this time.
0 commit comments