[libcxx-commits] [libcxx] [libc++] Use GCC compilers from compiler explorer (PR #97218)
via libcxx-commits
libcxx-commits at lists.llvm.org
Sun Jun 30 08:33:26 PDT 2024
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-libcxx
Author: Nikolas Klauser (philnik777)
<details>
<summary>Changes</summary>
This avoids the very recent system requirements for new GCC versions, making it a lot easier to update GCC in a timely matter.
---
Full diff: https://github.com/llvm/llvm-project/pull/97218.diff
1 Files Affected:
- (modified) libcxx/utils/ci/Dockerfile (+10-8)
``````````diff
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
``````````
</details>
https://github.com/llvm/llvm-project/pull/97218
More information about the libcxx-commits
mailing list