Refactor binary-compatible-builds for releases (#4171)

* Refactor binary-compatible-builds for releases

I was poking around this yesterday and noticed a few things that could
be improved for our release builds:

* The centos container for the x86_64 builds contained a bunch of extra
  tooling we no longer need such as python3 and a C++ compiler. Along
  with custom toolchain things this could all get removed since the C we
  include now is quite simple.

* The aarch64 and s390x cross-compiled builds had relatively high glibc
  version requirements compared to the x86_64 build. This was because we
  don't use a container to build the cross-compiled binaries. I added
  containers here along the lines of the x86_64 build to use an older
  glibc to build the release binary to lower our version requirement.
  This lower the aarch64 version requirement from glibc 2.28 to 2.17.
  Additionally the s390x requirement dropped from 2.28 to 2.16.

* To make the containers a bit easier to read/write I added
  `Dockerfile`s for them in a new `ci/docker` directory instead of
  hardcoding install commands in JS.

This isn't intended to be a really big change or anything for anyone,
but it's intended to keep our Linux-based builds consistent at least as
best we can.

* Remove temporary change
This commit is contained in:
Alex Crichton
2022-05-20 12:13:50 -05:00
committed by GitHub
parent 985ed07c3f
commit 08b7c87793
6 changed files with 37 additions and 45 deletions

View File

@@ -0,0 +1,7 @@
FROM ubuntu:16.04
RUN apt-get update -y && apt-get install -y gcc gcc-aarch64-linux-gnu ca-certificates
ENV PATH=$PATH:/rust/bin
ENV CARGO_BUILD_TARGET=aarch64-unknown-linux-gnu
ENV CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER=aarch64-linux-gnu-gcc

View File

@@ -0,0 +1,7 @@
FROM ubuntu:16.04
RUN apt-get update -y && apt-get install -y gcc gcc-s390x-linux-gnu ca-certificates
ENV PATH=$PATH:/rust/bin
ENV CARGO_BUILD_TARGET=s390x-unknown-linux-gnu
ENV CARGO_TARGET_S390X_UNKNOWN_LINUX_GNU_LINKER=s390x-linux-gnu-gcc

View File

@@ -0,0 +1,5 @@
FROM centos:7
RUN yum install -y git gcc
ENV PATH=$PATH:/rust/bin