From f96abf7f1abad2759168467e645aafd8854e5d04 Mon Sep 17 00:00:00 2001 From: Daniel Stone Date: Tue, 5 Nov 2024 15:33:45 +0000 Subject: [PATCH] ci: Remove obsolete compiler-wrapper We don't actually need this anymore. We were previously using it to find ccache, but Meson will do this for us. Now that we pass -Wl,--fatal-warnings, we don't need to pass -Werror to the link stage either. This removes two shell execs, one subshell, and one call to each of grep and printf, per compile. Signed-off-by: Daniel Stone Part-of: --- .../build/compiler-wrapper-clang++-15.sh | 7 ------- .gitlab-ci/build/compiler-wrapper-clang++.sh | 7 ------- .gitlab-ci/build/compiler-wrapper-clang-15.sh | 7 ------- .gitlab-ci/build/compiler-wrapper-clang.sh | 7 ------- .gitlab-ci/build/compiler-wrapper-g++.sh | 7 ------- .gitlab-ci/build/compiler-wrapper-gcc.sh | 7 ------- .gitlab-ci/build/compiler-wrapper.sh | 21 ------------------- .gitlab-ci/meson/build.sh | 4 +--- 8 files changed, 1 insertion(+), 66 deletions(-) delete mode 100755 .gitlab-ci/build/compiler-wrapper-clang++-15.sh delete mode 100755 .gitlab-ci/build/compiler-wrapper-clang++.sh delete mode 100755 .gitlab-ci/build/compiler-wrapper-clang-15.sh delete mode 100755 .gitlab-ci/build/compiler-wrapper-clang.sh delete mode 100755 .gitlab-ci/build/compiler-wrapper-g++.sh delete mode 100755 .gitlab-ci/build/compiler-wrapper-gcc.sh delete mode 100644 .gitlab-ci/build/compiler-wrapper.sh diff --git a/.gitlab-ci/build/compiler-wrapper-clang++-15.sh b/.gitlab-ci/build/compiler-wrapper-clang++-15.sh deleted file mode 100755 index 81935d3c4a7..00000000000 --- a/.gitlab-ci/build/compiler-wrapper-clang++-15.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/sh -# shellcheck disable=SC1091 - -set -e - -_COMPILER=clang++-15 -. compiler-wrapper.sh diff --git a/.gitlab-ci/build/compiler-wrapper-clang++.sh b/.gitlab-ci/build/compiler-wrapper-clang++.sh deleted file mode 100755 index f9d6a3f1db4..00000000000 --- a/.gitlab-ci/build/compiler-wrapper-clang++.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/sh -# shellcheck disable=SC1091 - -set -e - -_COMPILER=clang++ -. compiler-wrapper.sh diff --git a/.gitlab-ci/build/compiler-wrapper-clang-15.sh b/.gitlab-ci/build/compiler-wrapper-clang-15.sh deleted file mode 100755 index 38cbcdc6b98..00000000000 --- a/.gitlab-ci/build/compiler-wrapper-clang-15.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/sh -# shellcheck disable=SC1091 - -set -e - -_COMPILER=clang-15 -. compiler-wrapper.sh diff --git a/.gitlab-ci/build/compiler-wrapper-clang.sh b/.gitlab-ci/build/compiler-wrapper-clang.sh deleted file mode 100755 index 40dbe879e86..00000000000 --- a/.gitlab-ci/build/compiler-wrapper-clang.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/sh -# shellcheck disable=SC1091 - -set -e - -_COMPILER=clang -. compiler-wrapper.sh diff --git a/.gitlab-ci/build/compiler-wrapper-g++.sh b/.gitlab-ci/build/compiler-wrapper-g++.sh deleted file mode 100755 index 15f392a33f8..00000000000 --- a/.gitlab-ci/build/compiler-wrapper-g++.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/sh -# shellcheck disable=SC1091 - -set -e - -_COMPILER=g++ -. compiler-wrapper.sh diff --git a/.gitlab-ci/build/compiler-wrapper-gcc.sh b/.gitlab-ci/build/compiler-wrapper-gcc.sh deleted file mode 100755 index 25974812983..00000000000 --- a/.gitlab-ci/build/compiler-wrapper-gcc.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/sh -# shellcheck disable=SC1091 - -set -e - -_COMPILER=gcc -. compiler-wrapper.sh diff --git a/.gitlab-ci/build/compiler-wrapper.sh b/.gitlab-ci/build/compiler-wrapper.sh deleted file mode 100644 index 1f674925340..00000000000 --- a/.gitlab-ci/build/compiler-wrapper.sh +++ /dev/null @@ -1,21 +0,0 @@ -# shellcheck disable=SC1091 -# shellcheck disable=SC2086 # we want word splitting -if command -V ccache >/dev/null 2>/dev/null; then - CCACHE=ccache -else - CCACHE= -fi - -if echo "$@" | grep -E 'meson-private/tmp[^ /]*/testfile.c' >/dev/null; then - # Invoked for meson feature check - exec $CCACHE $_COMPILER "$@" -fi - -if [ "$(eval printf "'%s'" "\"\${$(($#-1))}\"")" = "-c" ]; then - # Not invoked for linking - exec $CCACHE $_COMPILER "$@" -fi - -# Compiler invoked by ninja for linking. Add -Werror to turn compiler warnings into errors -# with LTO. (meson's werror should arguably do this, but meanwhile we need to) -exec $CCACHE $_COMPILER "$@" -Werror diff --git a/.gitlab-ci/meson/build.sh b/.gitlab-ci/meson/build.sh index 0e29d735921..3b2064b91c8 100755 --- a/.gitlab-ci/meson/build.sh +++ b/.gitlab-ci/meson/build.sh @@ -28,9 +28,7 @@ export PATH=$PATH:$PWD/.gitlab-ci/build touch native.file printf > native.file "%s\n" \ - "[binaries]" \ - "c = 'compiler-wrapper-${CC:-gcc}.sh'" \ - "cpp = 'compiler-wrapper-${CXX:-g++}.sh'" + "[binaries]" # We need to control the version of llvm-config we're using, so we'll # tweak the cross file or generate a native file to do so.