Enable and squash compiler warnings
Compare changes
build: Separate out linker options
Meson warns that get_supported_arguments() is wrong for linker options like these.
build: Select C99 language standard at project level
check-vulkan: Avoid shadowing this->device with function parameter
Detected by g++ -Wshadow.
build: Disable -Wdeclaration-after-statement
It's inconsistent to ask for this in warning_cflags, and immediately disable it in no_warning_cflags.
build: Split out warning flags that are only supported for C
For completeness, I've added separate lists of flags that are only supported for C++, although there are none yet.
build: Disable undesired warnings for C++ too
In particular this disables -Wmissing-field-initializers in check-vulkan.
build: Enable extra warning flags for C++ too
gitlab-ci: Use clang++ for ubsan build
gitlab-ci: Make compiler warnings into errors
gitlab-ci: Build ubsan stage with both gcc and clang
They sometimes give different warnings.
build: Explicitly disable -Wpedantic
We're using GLib, and GLib explicitly doesn't support pedantic Standard C compilers: it assumes and requires the ability to cast between function pointers and data pointers.
build: Disable -Winline
As noted in pressure-vessel, if the compiler decides not to inline a
static inline
function (type-safe macro-equivalent), that isn't
really a bug.
build: Use warning level 2 by default
debian: Enable -Werror for UNRELEASED builds
Use our own filename for config.h
This is Meson best-practice: it avoids accidentally including the wrong config.h when using subprojects.
Define _GNU_SOURCE via -config.h
build: Consistently use project_include_dirs everywhere
This matters when invoked as a subproject, for example by pressure-vessel, in which case we don't get -I$(top_builddir).
/cc @denittis @jpwhiting