This replaces all of the Apache blurbs at the start of each file with an
`# SPDX-License-Identifier: Apache-2.0` string. It also fixes existing
uses to be consistent in capitalization, and to be placed above any
copyright notices.
This removes nearly 3000 lines of boilerplate from the project (only
python files), which no developer cares to look at.
SPDX is in common use, particularly in the Linux kernel, and is the
recommended format for Meson's own `project(license: )` field
Clang has a hand `-Wunused-command-line-argument` switch, which when
turned to an error, gets very grump about `-flto-jobs=0` being set in
the compiler arguments (although `-flto=` belongs there). We'll refactor
a bit to put that only in the link arguments.
GCC doesn't have this probably because, a) it doesn't have an equivalent
warning, and b) it uses `-flto=<$numthreads.
Fixes: #8347
We do this by making the mixins inherit the Compiler class only when
mypy is examining the code (using some clever inheritance shenanigans).
This caught a bunch of issues, and also lets us delete a ton of code.
I made the mistake of always selecting the debug CRT for compiler
checks on Windows 4 years ago:
https://github.com/mesonbuild/meson/pull/543https://github.com/mesonbuild/meson/pull/614
The idea was to always build the tests with debugging enabled so that
the compiler doesn't optimize the tests away. But we stopped doing
that a while ago, and also the debug CRT has no relation to that.
We should select the CRT in the same way that we do for building
targets: based on the options.
On Windows ARM64, the debug CRT for ARM64 isn't always available, and
the release CRT is available only after installing the runtime
package. Without this, we will always try to pick the debug CRT even
when --buildtype=debugoptimized or release.
D lang compilers have an option -release (or similar) which turns off
asserts, contracts, and other runtime type checking. This patch wires
that up to the b_ndebug flag.
Fixes#7082