meson.build: require GCC 12 or clang 14

GCC 10 doesn't have std::make_unique_for_overwrite(), so let's drop it.
This commit is contained in:
Max Kellermann
2025-01-29 12:23:17 +01:00
parent 8ea3f86f43
commit ab011adf77
6 changed files with 11 additions and 16 deletions

@ -41,11 +41,11 @@ jobs:
cxx: g++-14
packages: g++-14
meson_options:
- compiler: gcc10
- compiler: gcc12
os: ubuntu-24.04
cc: gcc-10
cxx: g++-10
packages: g++-10
cc: gcc-12
cxx: g++-12
packages: g++-12
meson_options:
- compiler: clang
os: ubuntu-24.04

2
NEWS

@ -58,7 +58,7 @@ ver 0.24 (not yet released)
- alsa: require alsa-lib 1.1 or later
- pipewire: map tags "Date" and "Comment"
* switch to C++20
- GCC 10 or clang 11 (or newer) recommended
- GCC 12 or clang 14 (or newer) recommended
* static partition configuration
* Windows
- build with libsamplerate

@ -12,7 +12,7 @@ Code Style
* indent with tabs (width 8)
* don't write CPP when you can write C++: use inline functions and constexpr instead of macros
* comment your code, document your APIs
* the code should be C++20 compliant, and must compile with :program:`GCC` 10 and :program:`clang` 11
* the code should be C++20 compliant, and must compile with :program:`GCC` 12 and :program:`clang` 14
* all code must be exception-safe
* classes and functions names use CamelCase; variables are lower-case with words separated by underscore

@ -57,7 +57,7 @@ and unpack it (or `clone the git repository
In any case, you need:
* a C++20 compiler (e.g. GCC 10 or clang 11)
* a C++20 compiler (e.g. GCC 12 or clang 14)
* `Meson 1.0 <http://mesonbuild.com/>`__ and `Ninja
<https://ninja-build.org/>`__
* pkg-config

@ -102,10 +102,10 @@ version_cxx = vcs_tag(input: 'src/GitVersion.cxx', output: 'GitVersion.cxx')
compiler = meson.get_compiler('cpp')
c_compiler = meson.get_compiler('c')
if compiler.get_id() == 'gcc' and compiler.version().version_compare('<10')
warning('Your GCC version is too old. You need at least version 10.')
elif compiler.get_id() == 'clang' and compiler.version().version_compare('<11')
warning('Your clang version is too old. You need at least version 11.')
if compiler.get_id() == 'gcc' and compiler.version().version_compare('<12')
warning('Your GCC version is too old. You need at least version 12.')
elif compiler.get_id() == 'clang' and compiler.version().version_compare('<14')
warning('Your clang version is too old. You need at least version 14.')
endif
version_conf = configuration_data()

@ -662,11 +662,6 @@ MadDecoder::DecodeFirstFrame(Tag *tag) noexcept
{
struct xing xing;
#if GCC_CHECK_VERSION(10,0)
/* work around bogus -Wuninitialized in GCC 10 */
xing.frames = 0;
#endif
while (true) {
const auto action = DecodeNextFrame(false, tag);
switch (action) {