ci: always use the -Werror wrapper
authorEric Engestrom <eric@igalia.com>
Fri, 17 Mar 2023 18:52:24 +0000 (18:52 +0000)
committerMarge Bot <emma+marge@anholt.net>
Wed, 22 Mar 2023 17:28:07 +0000 (17:28 +0000)
Signed-off-by: Eric Engestrom <eric@igalia.com>
Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21997>

.gitlab-ci/build/gitlab-ci.yml
.gitlab-ci/build/meson-native-lto-wrappers.txt [deleted file]
.gitlab-ci/meson/build.sh

index 0642bbf..fbf082b 100644 (file)
@@ -184,7 +184,6 @@ debian-build-testing:
     GALLIUM_DRIVERS: "iris,nouveau,kmsro,r300,r600,freedreno,swrast,svga,v3d,vc4,virgl,etnaviv,panfrost,lima,zink,d3d12,asahi,crocus"
     VULKAN_DRIVERS: swrast
     EXTRA_OPTION: >
-      --native-file .gitlab-ci/build/meson-native-lto-wrappers.txt
       -D spirv-to-dxil=true
       -D osmesa=true
       -D tools=drm-shim,etnaviv,freedreno,glsl,intel,intel-ui,nir,nouveau,lima,panfrost,asahi
@@ -198,7 +197,7 @@ debian-build-testing:
     section_switch yamllint "yamllint"
     .gitlab-ci/run-yamllint.sh
     section_switch meson "meson"
-    PATH=$PATH:$PWD/.gitlab-ci/build .gitlab-ci/meson/build.sh
+    .gitlab-ci/meson/build.sh
     section_switch shader-db "shader-db"
     .gitlab-ci/run-shader-db.sh
 
@@ -297,7 +296,6 @@ fedora-release:
       -D glvnd=true
       -D platforms=x11,wayland
     EXTRA_OPTION: >
-      --native-file .gitlab-ci/build/meson-native-lto-wrappers.txt
       -D b_lto=true
       -D osmesa=true
       -D selinux=true
@@ -325,7 +323,7 @@ fedora-release:
     UNWIND: "disabled"
     VULKAN_DRIVERS: "amd,broadcom,freedreno,imagination-experimental,intel,intel_hasvk"
   script:
-    - PATH=$PATH:$PWD/.gitlab-ci/build .gitlab-ci/meson/build.sh
+    - .gitlab-ci/meson/build.sh
 
 debian-android:
   extends:
diff --git a/.gitlab-ci/build/meson-native-lto-wrappers.txt b/.gitlab-ci/build/meson-native-lto-wrappers.txt
deleted file mode 100644 (file)
index 7bdd293..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-[binaries]
-c = 'gcc-link-werror.sh'
-cpp = 'g++-link-werror.sh'
index e3563b1..47b0693 100755 (executable)
@@ -7,18 +7,23 @@ set -o xtrace
 
 CROSS_FILE=/cross_file-"$CROSS".txt
 
+export PATH=$PATH:$PWD/.gitlab-ci/build
+
+touch native.file
+printf > native.file "%s\n" \
+  "[binaries]" \
+  "c = '${CC:-gcc}-link-werror.sh'" \
+  "cpp = '${CXX:-g++}-link-werror.sh'"
+
 # 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.
 if test -n "$LLVM_VERSION"; then
     LLVM_CONFIG="llvm-config-${LLVM_VERSION}"
-    echo -e "[binaries]\nllvm-config = '`which $LLVM_CONFIG`'" > native.file
+    echo "llvm-config = '`which $LLVM_CONFIG`'" >> native.file
     if [ -n "$CROSS" ]; then
         sed -i -e '/\[binaries\]/a\' -e "llvm-config = '`which $LLVM_CONFIG`'" $CROSS_FILE
     fi
     $LLVM_CONFIG --version
-else
-    rm -f native.file
-    touch native.file
 fi
 
 # cross-xfail-$CROSS, if it exists, contains a list of tests that are expected