diff options
| author | Nikita Popov <nikita.ppv@gmail.com> | 2021-02-03 18:11:28 +0100 |
|---|---|---|
| committer | Nikita Popov <nikita.ppv@gmail.com> | 2021-03-01 23:35:35 +0100 |
| commit | b763d9a40c526f5f72c0668d26f69241e7a42511 (patch) | |
| tree | ad51120472030d184146a6f1ff736ebb59c5bc0c /src/ci | |
| parent | 1e21b2cba8c96e4ab930d7aad473e08ddb483a78 (diff) | |
| download | rust-b763d9a40c526f5f72c0668d26f69241e7a42511.tar.gz rust-b763d9a40c526f5f72c0668d26f69241e7a42511.zip | |
Build both Python 2 and Python 3 on x86 dist builders
Python 2 is needed for Clang 10, Python 3 for LLVM 12. The Python 2 dependency could be removed by upgrading to Clang 11, but that causes linker errors of unclear origin.
Diffstat (limited to 'src/ci')
3 files changed, 14 insertions, 9 deletions
diff --git a/src/ci/docker/host-x86_64/dist-i686-linux/Dockerfile b/src/ci/docker/host-x86_64/dist-i686-linux/Dockerfile index 22d7cbb0d14..247b539652b 100644 --- a/src/ci/docker/host-x86_64/dist-i686-linux/Dockerfile +++ b/src/ci/docker/host-x86_64/dist-i686-linux/Dockerfile @@ -68,11 +68,13 @@ RUN ./build-binutils.sh COPY host-x86_64/dist-x86_64-linux/build-gcc.sh /tmp/ RUN ./build-gcc.sh && apt-get remove -y gcc g++ -# Debian 6 has Python 2.6 by default, but LLVM needs 2.7+ COPY host-x86_64/dist-x86_64-linux/build-python.sh /tmp/ -RUN ./build-python.sh +# Build Python 2.7 needed for Clang 10. +RUN ./build-python.sh 2.7.12 +# Build Python 3 needed for LLVM 12. +RUN ./build-python.sh 3.9.1 -# LLVM needs cmake 3.4.3 or higher, and is planning to raise to 3.13.4. +# LLVM needs cmake 3.13.4 or higher. COPY host-x86_64/dist-x86_64-linux/build-cmake.sh /tmp/ RUN ./build-cmake.sh diff --git a/src/ci/docker/host-x86_64/dist-x86_64-linux/Dockerfile b/src/ci/docker/host-x86_64/dist-x86_64-linux/Dockerfile index d1b4bbf7fff..4dd4378f196 100644 --- a/src/ci/docker/host-x86_64/dist-x86_64-linux/Dockerfile +++ b/src/ci/docker/host-x86_64/dist-x86_64-linux/Dockerfile @@ -68,11 +68,13 @@ RUN ./build-binutils.sh COPY host-x86_64/dist-x86_64-linux/build-gcc.sh /tmp/ RUN ./build-gcc.sh && apt-get remove -y gcc g++ -# Debian 6 has Python 2.6 by default, but LLVM needs 2.7+ COPY host-x86_64/dist-x86_64-linux/build-python.sh /tmp/ -RUN ./build-python.sh +# Build Python 2.7 needed for Clang 10. +RUN ./build-python.sh 2.7.12 +# Build Python 3 needed for LLVM 12. +RUN ./build-python.sh 3.9.1 -# LLVM needs cmake 3.4.3 or higher, and is planning to raise to 3.13.4. +# LLVM needs cmake 3.13.4 or higher. COPY host-x86_64/dist-x86_64-linux/build-cmake.sh /tmp/ RUN ./build-cmake.sh diff --git a/src/ci/docker/host-x86_64/dist-x86_64-linux/build-python.sh b/src/ci/docker/host-x86_64/dist-x86_64-linux/build-python.sh index c172b978112..970d67b6db3 100755 --- a/src/ci/docker/host-x86_64/dist-x86_64-linux/build-python.sh +++ b/src/ci/docker/host-x86_64/dist-x86_64-linux/build-python.sh @@ -3,7 +3,8 @@ set -ex source shared.sh -curl https://www.python.org/ftp/python/2.7.12/Python-2.7.12.tgz | \ +VERSION=$1 +curl https://www.python.org/ftp/python/$VERSION/Python-$VERSION.tgz | \ tar xzf - mkdir python-build @@ -12,10 +13,10 @@ cd python-build # Gotta do some hackery to tell python about our custom OpenSSL build, but other # than that fairly normal. CFLAGS='-I /rustroot/include' LDFLAGS='-L /rustroot/lib -L /rustroot/lib64' \ - hide_output ../Python-2.7.12/configure --prefix=/rustroot + hide_output ../Python-$VERSION/configure --prefix=/rustroot hide_output make -j10 hide_output make install cd .. rm -rf python-build -rm -rf Python-2.7.12 +rm -rf Python-$VERSION |
