[libcxx-commits] [libcxx] [libc++] Use GCC compilers from compiler explorer (PR #97219)
Nikolas Klauser via libcxx-commits
libcxx-commits at lists.llvm.org
Sun Jun 30 08:37:33 PDT 2024
https://github.com/philnik777 created https://github.com/llvm/llvm-project/pull/97219
This avoids the very recent system requirements for new GCC versions, making it a lot easier to update GCC in a timely manner.
>From c4e0dc44cbf41a73a0e5fbd49d3676f30f97f2bb Mon Sep 17 00:00:00 2001
From: Nikolas Klauser <nikolasklauser at berlin.de>
Date: Sun, 30 Jun 2024 17:31:28 +0200
Subject: [PATCH] [libc++] Use GCC compilers from compiler explorer
---
libcxx/utils/ci/Dockerfile | 18 ++++++++++--------
1 file changed, 10 insertions(+), 8 deletions(-)
diff --git a/libcxx/utils/ci/Dockerfile b/libcxx/utils/ci/Dockerfile
index 234b0b5873eb6..9e1865ee61fdf 100644
--- a/libcxx/utils/ci/Dockerfile
+++ b/libcxx/utils/ci/Dockerfile
@@ -99,9 +99,9 @@ RUN sudo apt-get update \
unzip \
uuid-dev \
wget \
+ xz-utils \
&& sudo rm -rf /var/lib/apt/lists/*
-
# Install various tools used by the build or the test suite
#RUN apt-get update && apt-get install -y ninja-build python3 python3-distutils python3-psutil git gdb ccache
# TODO add ninja-build once 1.11 is available in Ubuntu, also remove the manual installation.
@@ -142,13 +142,15 @@ EOF
# Install the most recent GCC, like clang install the previous version as a transition.
RUN <<EOF
- sudo apt-get update
- sudo apt-get install -y \
- gcc-$((GCC_LATEST_VERSION - 1)) \
- g++-$((GCC_LATEST_VERSION - 1)) \
- gcc-$GCC_LATEST_VERSION \
- g++-$GCC_LATEST_VERSION
- sudo rm -rf /var/lib/apt/lists/*
+ sudo git clone https://github.com/compiler-explorer/infra.git /tmp/ce-infra
+ (cd /tmp/ce-infra && sudo make ce)
+ sudo /tmp/ce-infra/bin/ce_install install compilers/c++/x86/gcc $GCC_LATEST_VERSION.1.0
+ sudo /tmp/ce-infra/bin/ce_install install compilers/c++/x86/gcc $((GCC_LATEST_VERSION - 1)).1.0
+ sudo ln -s /opt/compiler-explorer/gcc-$GCC_LATEST_VERSION.1.0/bin/gcc /usr/bin/gcc-$GCC_LATEST_VERSION
+ sudo ln -s /opt/compiler-explorer/gcc-$GCC_LATEST_VERSION.1.0/bin/g++ /usr/bin/g++-$GCC_LATEST_VERSION
+ sudo ln -s /opt/compiler-explorer/gcc-$((GCC_LATEST_VERSION - 1)).1.0/bin/gcc /usr/bin/gcc-$((GCC_LATEST_VERSION - 1))
+ sudo ln -s /opt/compiler-explorer/gcc-$((GCC_LATEST_VERSION - 1)).1.0/bin/g++ /usr/bin/g++-$((GCC_LATEST_VERSION - 1))
+ sudo rm -rf /tmp/ce-infra
EOF
RUN <<EOF
More information about the libcxx-commits
mailing list