Module: Mesa Branch: main Commit: c6928a4e6e111a105259d3e88b5f4b4c7279dd04 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=c6928a4e6e111a105259d3e88b5f4b4c7279dd04
Author: David Heidelberg <david.heidelb...@collabora.com> Date: Sun Oct 22 12:54:57 2023 +0200 ci: drop mingw and wine from the x86_64 build container MinGW is currently disabled and new implementation will handle things differently anyway. Reviewed-by: Martin Roukala <martin.rouk...@mupuf.org> Signed-off-by: David Heidelberg <david.heidelb...@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25843> --- .gitlab-ci/build/gitlab-ci.yml | 46 -------- .gitlab-ci/container/container_pre_build.sh | 2 +- .../container/debian/x86_64_build-base-wine.sh | 15 --- .gitlab-ci/container/debian/x86_64_build-base.sh | 4 +- .../container/debian/x86_64_build-mingw-patch.sh | 78 ------------- .../debian/x86_64_build-mingw-source-deps.sh | 125 --------------------- .gitlab-ci/container/debian/x86_64_build-mingw.sh | 13 --- .../container/debian/x86_64_mingw-toolchain.cmake | 8 -- .gitlab-ci/container/debian/x86_64_test-vk.sh | 5 - .gitlab-ci/container/gitlab-ci.yml | 23 ---- .gitlab-ci/image-tags.yml | 3 - .gitlab-ci/meson/build.sh | 3 +- .gitlab-ci/x86_64-w64-mingw32 | 21 ---- 13 files changed, 3 insertions(+), 343 deletions(-) diff --git a/.gitlab-ci/build/gitlab-ci.yml b/.gitlab-ci/build/gitlab-ci.yml index 002b0495375..b527ea91080 100644 --- a/.gitlab-ci/build/gitlab-ci.yml +++ b/.gitlab-ci/build/gitlab-ci.yml @@ -61,15 +61,6 @@ script: - .gitlab-ci/meson/build.sh -.meson-build_mingw: - extends: - - .build-linux - - .use-debian/x86_64_build_mingw - - .use-wine - stage: build-x86_64 - script: - - .gitlab-ci/meson/build.sh - debian-testing: extends: - .meson-build @@ -648,40 +639,3 @@ debian-ppc64el: CROSS: ppc64el GALLIUM_DRIVERS: "nouveau,radeonsi,swrast,virgl,zink" VULKAN_DRIVERS: "amd,swrast" - -# Disabled as it hangs with winedbg on shared runners -.debian-mingw32-x86_64: - extends: .meson-build_mingw - stage: build-misc - variables: - UNWIND: "disabled" - C_ARGS: > - -Wno-error=format - -Wno-error=unused-but-set-variable - CPP_ARGS: > - -Wno-error=format - -Wno-error=unused-function - -Wno-error=unused-variable - -Wno-error=sign-compare - -Wno-error=narrowing - GALLIUM_DRIVERS: "swrast,d3d12,zink" - VULKAN_DRIVERS: "swrast,amd,microsoft-experimental" - GALLIUM_ST: > - -D gallium-rusticl=false - -D opencl-spirv=true - -D microsoft-clc=enabled - -D static-libclc=all - -D opencl-external-clang-headers=disabled - -D llvm=enabled - -D gallium-va=enabled - -D video-codecs=h264dec,h264enc,h265dec,h265enc,vc1dec - EXTRA_OPTION: > - -D min-windows-version=7 - -D spirv-to-dxil=true - -D gles1=enabled - -D gles2=enabled - -D osmesa=true - -D cpp_rtti=true - -D shared-glapi=enabled - -D zlib=enabled - --cross-file=.gitlab-ci/x86_64-w64-mingw32 diff --git a/.gitlab-ci/container/container_pre_build.sh b/.gitlab-ci/container/container_pre_build.sh index 7df5ebf7e9a..a036ef9f39e 100755 --- a/.gitlab-ci/container/container_pre_build.sh +++ b/.gitlab-ci/container/container_pre_build.sh @@ -25,7 +25,7 @@ fi # When not using the mold linker (e.g. unsupported architecture), force # linkers to gold, since it's so much faster for building. We can't use -# lld because we're on old debian and it's buggy. ming fails meson builds +# lld because we're on old debian and it's buggy. mingw fails meson builds # with it with "meson.build:21:0: ERROR: Unable to determine dynamic linker" find /usr/bin -name \*-ld -o -name ld | \ grep -v mingw | \ diff --git a/.gitlab-ci/container/debian/x86_64_build-base-wine.sh b/.gitlab-ci/container/debian/x86_64_build-base-wine.sh deleted file mode 100644 index 275adfeb2c4..00000000000 --- a/.gitlab-ci/container/debian/x86_64_build-base-wine.sh +++ /dev/null @@ -1,15 +0,0 @@ -#!/usr/bin/env bash - -set -e -set -o xtrace - -# Installing wine, need this for testing mingw or nine - -apt-get update -apt-get install -y --no-remove \ - wine \ - wine64 \ - xvfb - -# Used to initialize the Wine environment to reduce build time -wine wineboot.exe --init diff --git a/.gitlab-ci/container/debian/x86_64_build-base.sh b/.gitlab-ci/container/debian/x86_64_build-base.sh index a0bc516f582..32a9a24dfcf 100644 --- a/.gitlab-ci/container/debian/x86_64_build-base.sh +++ b/.gitlab-ci/container/debian/x86_64_build-base.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # shellcheck disable=SC2086 # we want word splitting set -e @@ -84,8 +84,6 @@ pip3 install --break-system-packages meson==1.2.0 . .gitlab-ci/container/build-rust.sh -. .gitlab-ci/container/debian/x86_64_build-base-wine.sh - ############### Uninstall ephemeral packages apt-get purge -y $STABLE_EPHEMERAL diff --git a/.gitlab-ci/container/debian/x86_64_build-mingw-patch.sh b/.gitlab-ci/container/debian/x86_64_build-mingw-patch.sh deleted file mode 100644 index dd25bd3948e..00000000000 --- a/.gitlab-ci/container/debian/x86_64_build-mingw-patch.sh +++ /dev/null @@ -1,78 +0,0 @@ -#!/bin/bash -# shellcheck disable=SC2086 # we want word splitting - -set -e - -# Pull packages from msys2 repository that can be directly used. -# We can use https://packages.msys2.org/ to retrieve the newest package -mkdir ~/tmp -pushd ~/tmp -MINGW_PACKET_LIST=" -mingw-w64-x86_64-headers-git-10.0.0.r14.ga08c638f8-1-any.pkg.tar.zst -mingw-w64-x86_64-vulkan-loader-1.3.211-1-any.pkg.tar.zst -mingw-w64-x86_64-libelf-0.8.13-6-any.pkg.tar.zst -mingw-w64-x86_64-zlib-1.2.12-1-any.pkg.tar.zst -mingw-w64-x86_64-zstd-1.5.2-2-any.pkg.tar.zst -" - -for i in $MINGW_PACKET_LIST -do - curl -L -s --retry 4 -f --retry-all-errors --retry-delay 60 \ - -O "https://mirror.msys2.org/mingw/mingw64/$i" - tar xf $i --strip-components=1 -C /usr/x86_64-w64-mingw32/ -done -popd -rm -rf ~/tmp - -mkdir -p /usr/x86_64-w64-mingw32/bin - -# The output of `wine64 llvm-config --system-libs --cxxflags mcdisassembler` -# containes absolute path like '-IZ:' -# The sed is used to replace `-IZ:/usr/x86_64-w64-mingw32/include` -# to `-I/usr/x86_64-w64-mingw32/include` - -# Debian's pkg-config wrapers for mingw are broken, and there's no sign that -# they're going to be fixed, so we'll just have to fix it ourselves -# https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=930492 -cat >/usr/x86_64-w64-mingw32/bin/pkg-config <<EOF -#!/bin/sh - -PKG_CONFIG_LIBDIR=/usr/x86_64-w64-mingw32/lib/pkgconfig:/usr/x86_64-w64-mingw32/share/pkgconfig pkg-config \$@ -EOF -chmod +x /usr/x86_64-w64-mingw32/bin/pkg-config - -cat >/usr/x86_64-w64-mingw32/bin/llvm-config <<EOF -#!/bin/sh -wine64 llvm-config \$@ | sed -e "s,Z:/,/,gi" -EOF -chmod +x /usr/x86_64-w64-mingw32/bin/llvm-config - -cat >/usr/x86_64-w64-mingw32/bin/clang <<EOF -#!/bin/sh -wine64 clang \$@ -EOF -chmod +x /usr/x86_64-w64-mingw32/bin/clang - -cat >/usr/x86_64-w64-mingw32/bin/llvm-as <<EOF -#!/bin/sh -wine64 llvm-as \$@ -EOF -chmod +x /usr/x86_64-w64-mingw32/bin/llvm-as - -cat >/usr/x86_64-w64-mingw32/bin/llvm-link <<EOF -#!/bin/sh -wine64 llvm-link \$@ -EOF -chmod +x /usr/x86_64-w64-mingw32/bin/llvm-link - -cat >/usr/x86_64-w64-mingw32/bin/opt <<EOF -#!/bin/sh -wine64 opt \$@ -EOF -chmod +x /usr/x86_64-w64-mingw32/bin/opt - -cat >/usr/x86_64-w64-mingw32/bin/llvm-spirv <<EOF -#!/bin/sh -wine64 llvm-spirv \$@ -EOF -chmod +x /usr/x86_64-w64-mingw32/bin/llvm-spirv diff --git a/.gitlab-ci/container/debian/x86_64_build-mingw-source-deps.sh b/.gitlab-ci/container/debian/x86_64_build-mingw-source-deps.sh deleted file mode 100644 index a6170795518..00000000000 --- a/.gitlab-ci/container/debian/x86_64_build-mingw-source-deps.sh +++ /dev/null @@ -1,125 +0,0 @@ -#!/bin/bash -# shellcheck disable=SC2086 # we want word splitting - -set -e - -# Building libdrm (libva dependency) -. .gitlab-ci/container/build-libdrm.sh - -wd=$PWD -CMAKE_TOOLCHAIN_MINGW_PATH=$wd/.gitlab-ci/container/debian/x86_mingw-toolchain.cmake -mkdir -p ~/tmp -pushd ~/tmp - -# Building DirectX-Headers -git clone https://github.com/microsoft/DirectX-Headers -b v1.606.4 --depth 1 -mkdir -p DirectX-Headers/build -pushd DirectX-Headers/build -meson .. \ ---backend=ninja \ ---buildtype=release -Dbuild-test=false \ --Dprefix=/usr/x86_64-w64-mingw32/ \ ---cross-file=$wd/.gitlab-ci/x86_64-w64-mingw32 - -ninja install -popd - -# Building libva -git clone https://github.com/intel/libva -pushd libva/ -# libva-win32 is released with libva version 2.17 (see https://github.com/intel/libva/releases/tag/2.17.0) -git checkout 2.17.0 -popd -# libva already has a build dir in their repo, use builddir instead -mkdir -p libva/builddir -pushd libva/builddir -meson .. \ ---backend=ninja \ ---buildtype=release \ --Dprefix=/usr/x86_64-w64-mingw32/ \ ---cross-file=$wd/.gitlab-ci/x86_64-w64-mingw32 - -ninja install -popd - -export VULKAN_SDK_VERSION=1.3.211.0 - -# Building SPIRV Tools -git clone -b sdk-$VULKAN_SDK_VERSION --depth=1 \ -https://github.com/KhronosGroup/SPIRV-Tools SPIRV-Tools - -git clone -b sdk-$VULKAN_SDK_VERSION --depth=1 \ -https://github.com/KhronosGroup/SPIRV-Headers SPIRV-Tools/external/SPIRV-Headers - -mkdir -p SPIRV-Tools/build -pushd SPIRV-Tools/build -cmake .. \ --DCMAKE_TOOLCHAIN_FILE=$CMAKE_TOOLCHAIN_MINGW_PATH \ --DCMAKE_INSTALL_PREFIX=/usr/x86_64-w64-mingw32/ \ --GNinja -DCMAKE_BUILD_TYPE=Release \ --DCMAKE_CROSSCOMPILING=1 \ --DCMAKE_POLICY_DEFAULT_CMP0091=NEW - -ninja install -popd - -# Building LLVM -git clone -b release/15.x --depth=1 \ -https://github.com/llvm/llvm-project llvm-project - -git clone -b v15.0.0 --depth=1 \ -https://github.com/KhronosGroup/SPIRV-LLVM-Translator llvm-project/llvm/projects/SPIRV-LLVM-Translator - -mkdir llvm-project/build -pushd llvm-project/build -cmake ../llvm \ --DCMAKE_TOOLCHAIN_FILE=$CMAKE_TOOLCHAIN_MINGW_PATH \ --DCMAKE_INSTALL_PREFIX=/usr/x86_64-w64-mingw32/ \ --GNinja -DCMAKE_BUILD_TYPE=Release \ --DCMAKE_CROSSCOMPILING=1 \ --DLLVM_ENABLE_RTTI=ON \ --DCROSS_TOOLCHAIN_FLAGS_NATIVE=-DLLVM_EXTERNAL_SPIRV_HEADERS_SOURCE_DIR=$PWD/../../SPIRV-Tools/external/SPIRV-Headers \ --DLLVM_EXTERNAL_SPIRV_HEADERS_SOURCE_DIR=$PWD/../../SPIRV-Tools/external/SPIRV-Headers \ --DLLVM_ENABLE_PROJECTS="clang" \ --DLLVM_TARGETS_TO_BUILD="AMDGPU;X86" \ --DLLVM_OPTIMIZED_TABLEGEN=TRUE \ --DLLVM_ENABLE_ASSERTIONS=TRUE \ --DLLVM_INCLUDE_UTILS=OFF \ --DLLVM_INCLUDE_RUNTIMES=OFF \ --DLLVM_INCLUDE_TESTS=OFF \ --DLLVM_INCLUDE_EXAMPLES=OFF \ --DLLVM_INCLUDE_GO_TESTS=OFF \ --DLLVM_INCLUDE_BENCHMARKS=OFF \ --DLLVM_BUILD_LLVM_C_DYLIB=OFF \ --DLLVM_ENABLE_DIA_SDK=OFF \ --DCLANG_BUILD_TOOLS=ON \ --DLLVM_SPIRV_INCLUDE_TESTS=OFF - -ninja install -popd - -# Building libclc -mkdir llvm-project/build-libclc -pushd llvm-project/build-libclc -cmake ../libclc \ --DCMAKE_TOOLCHAIN_FILE=$CMAKE_TOOLCHAIN_MINGW_PATH \ --DCMAKE_INSTALL_PREFIX=/usr/x86_64-w64-mingw32/ \ --GNinja -DCMAKE_BUILD_TYPE=Release \ --DCMAKE_CROSSCOMPILING=1 \ --DCMAKE_POLICY_DEFAULT_CMP0091=NEW \ --DCMAKE_CXX_FLAGS="-m64" \ --DLLVM_CONFIG="/usr/x86_64-w64-mingw32/bin/llvm-config" \ --DLLVM_CLANG="/usr/x86_64-w64-mingw32/bin/clang" \ --DLLVM_AS="/usr/x86_64-w64-mingw32/bin/llvm-as" \ --DLLVM_LINK="/usr/x86_64-w64-mingw32/bin/llvm-link" \ --DLLVM_OPT="/usr/x86_64-w64-mingw32/bin/opt" \ --DLLVM_SPIRV="/usr/x86_64-w64-mingw32/bin/llvm-spirv" \ --DLIBCLC_TARGETS_TO_BUILD="spirv-mesa3d-;spirv64-mesa3d-" - -ninja install -popd - -popd # ~/tmp - -# Cleanup ~/tmp -rm -rf ~/tmp diff --git a/.gitlab-ci/container/debian/x86_64_build-mingw.sh b/.gitlab-ci/container/debian/x86_64_build-mingw.sh deleted file mode 100644 index f5985217411..00000000000 --- a/.gitlab-ci/container/debian/x86_64_build-mingw.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/usr/bin/env bash - -set -e -set -o xtrace - -apt-get update -apt-get install -y --no-remove \ - zstd \ - g++-mingw-w64-i686 \ - g++-mingw-w64-x86-64 - -. .gitlab-ci/container/debian/x86_64_build-mingw-patch.sh -. .gitlab-ci/container/debian/x86_64_build-mingw-source-deps.sh diff --git a/.gitlab-ci/container/debian/x86_64_mingw-toolchain.cmake b/.gitlab-ci/container/debian/x86_64_mingw-toolchain.cmake deleted file mode 100644 index e13aa4f670a..00000000000 --- a/.gitlab-ci/container/debian/x86_64_mingw-toolchain.cmake +++ /dev/null @@ -1,8 +0,0 @@ -set(CMAKE_SYSTEM_NAME Windows) -set(CMAKE_SYSTEM_PROCESSOR x86_64) - -set(CMAKE_SYSROOT /usr/x86_64-w64-mingw32/) -set(ENV{PKG_CONFIG} /usr/x86_64-w64-mingw32/bin/pkgconf) - -set(CMAKE_C_COMPILER x86_64-w64-mingw32-gcc-posix) -set(CMAKE_CXX_COMPILER x86_64-w64-mingw32-g++-posix) diff --git a/.gitlab-ci/container/debian/x86_64_test-vk.sh b/.gitlab-ci/container/debian/x86_64_test-vk.sh index 2b4c4c364f6..793f377a1e0 100644 --- a/.gitlab-ci/container/debian/x86_64_test-vk.sh +++ b/.gitlab-ci/container/debian/x86_64_test-vk.sh @@ -15,8 +15,6 @@ STABLE_EPHEMERAL=" \ ccache \ cmake \ g++ \ - g++-mingw-w64-i686-posix \ - g++-mingw-w64-x86-64-posix \ glslang-tools \ libexpat1-dev \ gnupg2 \ @@ -36,9 +34,6 @@ STABLE_EPHEMERAL=" \ libxrender-dev \ libzstd-dev \ meson \ - mingw-w64-i686-dev \ - mingw-w64-tools \ - mingw-w64-x86-64-dev \ p7zip \ patch \ pkgconf \ diff --git a/.gitlab-ci/container/gitlab-ci.yml b/.gitlab-ci/container/gitlab-ci.yml index f99ab2cf676..54f5f739682 100644 --- a/.gitlab-ci/container/gitlab-ci.yml +++ b/.gitlab-ci/container/gitlab-ci.yml @@ -23,10 +23,6 @@ variables: MESA_IMAGE: "$CI_REGISTRY_IMAGE/${MESA_IMAGE_PATH}:${FDO_DISTRIBUTION_TAG}" -.use-wine: - variables: - WINEPATH: "/usr/x86_64-w64-mingw32/bin;/usr/x86_64-w64-mingw32/lib;/usr/lib/gcc/x86_64-w64-mingw32/10-posix;c:/windows;c:/windows/system32" - # Build the CI docker images. # # MESA_IMAGE_TAG is the tag of the docker image used by later stage jobs. If the @@ -49,7 +45,6 @@ extends: - .container+build-rules - .incorporate-templates-commit - - .use-wine variables: FDO_DISTRIBUTION_VERSION: bookworm-slim FDO_REPO_SUFFIX: $CI_JOB_NAME @@ -115,24 +110,6 @@ debian/x86_32_build: needs: - debian/x86_32_build -# Debian based x86_64-mingw cross main build image -# FIXME: Until gets fixed on Debian 12, disabled. -.debian/x86_64_build-mingw: - extends: - - .use-debian/x86_64_build-base - variables: - MESA_IMAGE_TAG: &debian-x86_64_build_mingw ${DEBIAN_BUILD_MINGW_TAG} - -.use-debian/x86_64_build_mingw: - extends: - - .set-image-base-tag - variables: - MESA_BASE_TAG: *debian-x86_64_build-base - MESA_IMAGE_PATH: ${DEBIAN_X86_64_BUILD_MINGW_IMAGE_PATH} - MESA_IMAGE_TAG: *debian-x86_64_build_mingw - needs: - - .debian/x86_64_build-mingw - # Debian based ppc64el cross-build image debian/ppc64el_build: extends: diff --git a/.gitlab-ci/image-tags.yml b/.gitlab-ci/image-tags.yml index d00b03981fe..156b556a971 100644 --- a/.gitlab-ci/image-tags.yml +++ b/.gitlab-ci/image-tags.yml @@ -12,9 +12,6 @@ variables: DEBIAN_X86_64_BUILD_IMAGE_PATH: "debian/x86_64_build" DEBIAN_BUILD_TAG: "2023-10-30-ci-improv" - DEBIAN_X86_64_BUILD_MINGW_IMAGE_PATH: "debian/x86_64_build-mingw" - DEBIAN_BUILD_MINGW_TAG: "2023-05-25-bookworm" - DEBIAN_X86_64_TEST_BASE_IMAGE: "debian/x86_64_test-base" DEBIAN_X86_64_TEST_IMAGE_GL_PATH: "debian/x86_64_test-gl" diff --git a/.gitlab-ci/meson/build.sh b/.gitlab-ci/meson/build.sh index 18c0f114dd1..ee4ef8da4cb 100755 --- a/.gitlab-ci/meson/build.sh +++ b/.gitlab-ci/meson/build.sh @@ -51,9 +51,8 @@ fi # Only use GNU time if available, not any shell built-in command case $CI_JOB_NAME in - # strace and wine don't seem to mix well # ASAN leak detection is incompatible with strace - debian-mingw32-x86_64|*-asan*) + *-asan*) if test -f /usr/bin/time; then MESON_TEST_ARGS+=--wrapper=$PWD/.gitlab-ci/meson/time.sh fi diff --git a/.gitlab-ci/x86_64-w64-mingw32 b/.gitlab-ci/x86_64-w64-mingw32 deleted file mode 100644 index 5b32036750e..00000000000 --- a/.gitlab-ci/x86_64-w64-mingw32 +++ /dev/null @@ -1,21 +0,0 @@ -[binaries] -c = ['ccache', 'x86_64-w64-mingw32-gcc-posix'] -cpp = ['ccache', 'x86_64-w64-mingw32-g++-posix'] -ar = 'x86_64-w64-mingw32-ar' -strip = 'x86_64-w64-mingw32-strip' -pkgconfig = '/usr/x86_64-w64-mingw32/bin/pkgconf' -llvm-config = '/usr/x86_64-w64-mingw32/bin/llvm-config' -windres = 'x86_64-w64-mingw32-windres' -exe_wrapper = ['wine64'] - -[properties] -needs_exe_wrapper = True -sys_root = '/usr/x86_64-w64-mingw32/' - -[host_machine] -system = 'windows' -cpu_family = 'x86_64' -cpu = 'x86_64' -endian = 'little' - -; vim: ft=dosini