ci: Enable -Werror in clang jobs
They're not warning-clean yet, but we can enable -Werror in general and just allow the existing types of warnings as exceptions with -Wno-error=[...]. This way, new warnings of all other types will be prevented from entering the code base. Once all warnings of a certain type have been eliminated in a job, the exception for that type can be dropped from that job. This provides a realistic path to a fully warning-clean CI build in the future. v2: * Use echo -n (Juan A. Suarez) Reviewed-by: Eric Anholt <eric@anholt.net> # v1 Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10220>
This commit is contained in:
@@ -750,6 +750,21 @@ meson-android:
|
|||||||
- .use-android_build
|
- .use-android_build
|
||||||
variables:
|
variables:
|
||||||
UNWIND: "disabled"
|
UNWIND: "disabled"
|
||||||
|
C_ARGS: >
|
||||||
|
-Wno-error=absolute-value
|
||||||
|
-Wno-error=asm-operand-widths
|
||||||
|
-Wno-error=constant-conversion
|
||||||
|
-Wno-error=enum-conversion
|
||||||
|
-Wno-error=extern-initializer
|
||||||
|
-Wno-error=initializer-overrides
|
||||||
|
-Wno-error=missing-braces
|
||||||
|
-Wno-error=sometimes-uninitialized
|
||||||
|
-Wno-error=tautological-constant-out-of-range-compare
|
||||||
|
-Wno-error=unused-function
|
||||||
|
-Wno-error=unused-label
|
||||||
|
CPP_ARGS: >
|
||||||
|
-Wno-error=deprecated-declarations
|
||||||
|
-Wno-error=non-virtual-dtor
|
||||||
DRI_LOADERS: >
|
DRI_LOADERS: >
|
||||||
-D glx=disabled
|
-D glx=disabled
|
||||||
-D gbm=disabled
|
-D gbm=disabled
|
||||||
@@ -760,6 +775,7 @@ meson-android:
|
|||||||
-D llvm=disabled
|
-D llvm=disabled
|
||||||
-D platform-sdk-version=26
|
-D platform-sdk-version=26
|
||||||
-D valgrind=false
|
-D valgrind=false
|
||||||
|
-D werror=true
|
||||||
GALLIUM_ST: >
|
GALLIUM_ST: >
|
||||||
-D dri3=disabled
|
-D dri3=disabled
|
||||||
-D gallium-vdpau=disabled
|
-D gallium-vdpau=disabled
|
||||||
@@ -869,9 +885,47 @@ meson-clang:
|
|||||||
extends: .meson-build
|
extends: .meson-build
|
||||||
variables:
|
variables:
|
||||||
UNWIND: "enabled"
|
UNWIND: "enabled"
|
||||||
|
C_ARGS: >
|
||||||
|
-Wno-error=absolute-value
|
||||||
|
-Wno-error=constant-conversion
|
||||||
|
-Wno-error=constant-logical-operand
|
||||||
|
-Wno-error=enum-conversion
|
||||||
|
-Wno-error=gnu-variable-sized-type-not-at-end
|
||||||
|
-Wno-error=implicit-const-int-float-conversion
|
||||||
|
-Wno-error=initializer-overrides
|
||||||
|
-Wno-error=misleading-indentation
|
||||||
|
-Wno-error=mismatched-tags
|
||||||
|
-Wno-error=missing-braces
|
||||||
|
-Wno-error=overloaded-virtual
|
||||||
|
-Wno-error=self-assign
|
||||||
|
-Wno-error=sometimes-uninitialized
|
||||||
|
-Wno-error=tautological-constant-compare
|
||||||
|
-Wno-error=tautological-constant-out-of-range-compare
|
||||||
|
-Wno-error=tautological-overlap-compare
|
||||||
|
-Wno-error=typedef-redefinition
|
||||||
|
-Wno-error=unused-function
|
||||||
|
-Wno-error=unused-private-field
|
||||||
|
-Wno-error=xor-used-as-pow
|
||||||
|
CPP_ARGS: >
|
||||||
|
-Wno-error=c99-designator
|
||||||
|
-Wno-error=constant-logical-operand
|
||||||
|
-Wno-error=deprecated-declarations
|
||||||
|
-Wno-error=implicit-const-int-float-conversion
|
||||||
|
-Wno-error=mismatched-tags
|
||||||
|
-Wno-error=missing-braces
|
||||||
|
-Wno-error=overloaded-virtual
|
||||||
|
-Wno-error=self-assign
|
||||||
|
-Wno-error=sometimes-uninitialized
|
||||||
|
-Wno-error=tautological-constant-out-of-range-compare
|
||||||
|
-Wno-error=unused-const-variable
|
||||||
|
-Wno-error=unused-private-field
|
||||||
|
-Wno-error=unused-value
|
||||||
|
-Wno-error=unused-variable
|
||||||
DRI_LOADERS: >
|
DRI_LOADERS: >
|
||||||
-D glvnd=true
|
-D glvnd=true
|
||||||
DRI_DRIVERS: "auto"
|
DRI_DRIVERS: "auto"
|
||||||
|
EXTRA_OPTION: >
|
||||||
|
-D werror=true
|
||||||
GALLIUM_DRIVERS: "iris,nouveau,kmsro,r300,r600,freedreno,swr,swrast,svga,v3d,vc4,virgl,etnaviv,panfrost,lima,zink,radeonsi,tegra,d3d12"
|
GALLIUM_DRIVERS: "iris,nouveau,kmsro,r300,r600,freedreno,swr,swrast,svga,v3d,vc4,virgl,etnaviv,panfrost,lima,zink,radeonsi,tegra,d3d12"
|
||||||
VULKAN_DRIVERS: intel,amd,freedreno,broadcom,virtio-experimental
|
VULKAN_DRIVERS: intel,amd,freedreno,broadcom,virtio-experimental
|
||||||
CC: clang
|
CC: clang
|
||||||
|
@@ -64,6 +64,8 @@ meson _build --native-file=native.file \
|
|||||||
-D libdir=lib \
|
-D libdir=lib \
|
||||||
-D buildtype=${BUILDTYPE:-debug} \
|
-D buildtype=${BUILDTYPE:-debug} \
|
||||||
-D build-tests=true \
|
-D build-tests=true \
|
||||||
|
-D c_args="$(echo -n $C_ARGS)" \
|
||||||
|
-D cpp_args="$(echo -n $CPP_ARGS)" \
|
||||||
-D libunwind=${UNWIND} \
|
-D libunwind=${UNWIND} \
|
||||||
${DRI_LOADERS} \
|
${DRI_LOADERS} \
|
||||||
-D dri-drivers=${DRI_DRIVERS:-[]} \
|
-D dri-drivers=${DRI_DRIVERS:-[]} \
|
||||||
|
Reference in New Issue
Block a user