[libcxx-commits] [libcxx] 9ce895c - [libc++] Use GCC compilers from compiler explorer (#97219)

via libcxx-commits libcxx-commits at lists.llvm.org
Wed Jul 3 07:30:01 PDT 2024


Author: Nikolas Klauser
Date: 2024-07-03T16:29:58+02:00
New Revision: 9ce895c1ae12ebed4249f2d693dcbff146193c60

URL: https://github.com/llvm/llvm-project/commit/9ce895c1ae12ebed4249f2d693dcbff146193c60
DIFF: https://github.com/llvm/llvm-project/commit/9ce895c1ae12ebed4249f2d693dcbff146193c60.diff

LOG: [libc++] Use GCC compilers from compiler explorer (#97219)

This avoids the very recent system requirements for new GCC versions,
making it a lot easier to update GCC in a timely manner.

Added: 
    

Modified: 
    libcxx/utils/ci/Dockerfile

Removed: 
    


################################################################################
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