diff options
author | Adam Cozzette <acozzette@google.com> | 2018-07-27 16:36:41 -0700 |
---|---|---|
committer | Adam Cozzette <acozzette@google.com> | 2018-08-01 15:01:05 -0700 |
commit | 377f64f82f3a967769cbec510bfca1b1a6697868 (patch) | |
tree | 9027bd8796d716e203f29bb5aeec69fcd7025591 /kokoro/release | |
parent | 21fc01b63c7f60bae4e230c817a82bd8571a4a70 (diff) | |
download | protobuf-377f64f82f3a967769cbec510bfca1b1a6697868.tar.gz protobuf-377f64f82f3a967769cbec510bfca1b1a6697868.tar.bz2 protobuf-377f64f82f3a967769cbec510bfca1b1a6697868.zip |
Added support for building the aarch64 and ppcle64 protoc binaries with Kokoro
This was fairly straightforward using the existing build-protoc.sh
script. The only problem I ran into was that the x86 Docker builds
create output directories owned by root, which caused some permission
issues. Fortunately it was easy to get around that just by doing those
Docker builds last.
Diffstat (limited to 'kokoro/release')
-rwxr-xr-x | kokoro/release/protoc/linux/build.sh | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/kokoro/release/protoc/linux/build.sh b/kokoro/release/protoc/linux/build.sh index 6c7049d7..f0cde494 100755 --- a/kokoro/release/protoc/linux/build.sh +++ b/kokoro/release/protoc/linux/build.sh @@ -11,6 +11,16 @@ git submodule update --init --recursive # Generate the configure script. ./autogen.sh +# Cross-build for aarch64 and ppc64le. Note: we do these builds first to avoid +# file permission issues. The Docker builds will create directories owned by +# root, which causes problems if we try to add new artifacts to those +# directories afterward. +sudo apt install -y g++-aarch64-linux-gnu +protoc-artifacts/build-protoc.sh linux aarch_64 protoc + +sudo apt install -y g++-powerpc64le-linux-gnu +protoc-artifacts/build-protoc.sh linux ppcle_64 protoc + # Use docker image to build linux artifacts. DOCKER_IMAGE_NAME=protobuf/protoc_$(sha1sum protoc-artifacts/Dockerfile | cut -f1 -d " ") docker pull $DOCKER_IMAGE_NAME @@ -28,9 +38,3 @@ docker run -v $(pwd):/var/local/protobuf --rm $DOCKER_IMAGE_NAME \ echo "Failed to build protoc for linux + x86_32." exit 1 } - -# Cross-build for some architectures. -# TODO(xiaofeng): It currently fails with "machine `aarch64' not recognized" -# error. -# sudo apt install -y g++-aarch64-linux-gnu -# protoc-artifacts/build-protoc.sh linux aarch_64 protoc |